0% found this document useful (0 votes)
23 views24 pages

Sasi Final Year Project-1

The document is a declaration and project report for a mini project titled 'PHONE NUMBER TRACK' completed by a BCA student at Thiruvalluvar University. It outlines the project's purpose, which is to track phone numbers using various technologies, and discusses its requirements, current status, limitations, and key features. The report also includes acknowledgments, an index, and a bibliography of resources used in the project.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views24 pages

Sasi Final Year Project-1

The document is a declaration and project report for a mini project titled 'PHONE NUMBER TRACK' completed by a BCA student at Thiruvalluvar University. It outlines the project's purpose, which is to track phone numbers using various technologies, and discusses its requirements, current status, limitations, and key features. The report also includes acknowledgments, an index, and a bibliography of resources used in the project.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 24

DECLARATION

I hereby declare that the Mini project work entitled


"PHONE NUMBER TRACK" is an authentic record of
our own work carried out in BCA degree in
computer application from Thiruvalluvar University,
Tiruvannamalai, under the guidance of Mrs.
Loveneet Kaur during September to
November 2016. All the information furnished in
this mini project report is based on our own
intensive work and is genuine.

Place: Tiruvannamalai

Date:
Signature of
Candidate
(SASI PRIYA.S)
(Reg. No.)
ACKNOWLEDGEMENT

I take this opportunity to present my votes of thanks to all


those guideposts who really acted as lightening pillars to
enlighten my way throughout this project that has led to
successful and satisfactory completion of this study.

I am really grateful to Mr. Amandeep Nagpal for


providing me with an opportunity to undertake this
project and providing me with all the facilities. I am highly
thankful to sir for his active support, valuable time and
advice, whole-hearted guidance, sincere cooperation and
pains-taking involvement during the study and in
completing the assignment of preparing the said project
within the time stipulated.

Lastly, I am thankful to all those, particularly the various


friends, who have been instrumental in creating proper,
healthy and conductive environment and including new
and fresh innovative ideas for me during the project,
without their help, it would have been extremely difficult
for me to prepare the project in a time bound framework.

Place: Tiruvannamalai
Date:
(S
ASI PRIYA.S)

INDEX

Declaration………………………………………………………………………
……… i

Acknowledgement………………………………………………………………
……. ii

1. Introduction of the
Project.............................................................. 1

2. Problem
Statement………………………………………………………………... 2

3. Requirements of
Project.................................................................. 3

4. Current Status of the


project............................................................

5. Limitations of the Project (If any)


……………………………………………. 4

6.
Bibliography………………………………………………………………………
….
7. Code……………………………………………………………………………
………. 15

8.
Conclusion………………………………………………………………………
……. 22

INTRODUCTION
Phone number tracking is the process of locating a device
using its phone number through GPS, cell towers, or
online databases.

 Law enforcement uses it for criminal investigations.


 Parents track children for safety.
 Businesses monitor employees or delivery services.
 Emergency services locate individuals in distress.
 It is used for various purposes, including security,
emergency services, law enforcement, business
analytics, and personal safety.

PROBLEM STATEMENT

Mobile phone tracking plays a crucial role in security,


navigation, and emergency response. However, it
presents several challenges, including privacy
concerns, legal restrictions, accuracy issues, and
potential misuse.
 Privacy Concerns
 Legal and Ethical Issues
 Security Risks
 Dependence on Network Availability
 Misuse in Personal and Corporate Setting
 Balancing Security and Privacy

RECUREMENTS
1) SOFTWARE REQUIREMENTS:

A) Python: 3.13.0 compiler or greater version.

B) Technology : Python programming.


2) COMPONENETS: One print out hard copy of report and one
CD includes

soft copy of report, running project folder

CURRENT STATUS OF THE PROJECT

1. Define whether the project is in the planning,


development, testing, or deployment phase
2. Specify tracking methods such as GPS, cell tower
triangulation, IP tracking, or third-party APIs.
3. Addressing issues like network dependency, device
restrictions, and privacy concerns.
4. Planning enhancements such as AI-driven location
prediction, better security features, or
regulatory adaptations.

LIMITATIONS
 Location tracking can be inaccurate in areas with
weak GPS signals, dense urban environments, or
underground locations.
 Many countries have strict laws restricting
unauthorized tracking, and improper use can lead
to legal consequences.
 Continuous tracking, especially through GPS,
significantly reduces a phone’s battery life.
 High-precision tracking solutions, such as real-time
GPS tracking, require expensive software
and infrastructure

BIBLOGRAPHY

1. https://www.tutorialspoint.com/python

2. https://docs.python.org/3/tutorial

3. www.programiz.com/python-programming

4.
https://en.wikibooks.org/wiki/A_Beginner's_Python_Tutori
al
5. Quora.com

6. Sthurlow.com sthurlow.com/python/

Key Features:
1. Phone Number Validation: Check if the entered
phone number is valid based on its format (using
regular expressions).
2. Phone Number Information Lookup: Retrieve
information about the phone number, including the
country, carrier, and line type (using an API like
Numverify or Twilio).
3. Data Storage: Store phone number information in
a database (e.g., SQLite) for future reference and
historical tracking.
4. User Interface: Develop a graphical user interface
(GUI) to allow users to input phone numbers and
view results easily.
5.Visualizations: Visualize the data (e.g., a map
showing the locations of tracked phone numbers).
Technologies Used:
 Python: Programming language for the project.
 SQLite: Database for storing phone number data.
 Tkinter: For building a simple desktop GUI (or
Flask/Django for a web-based app).
 Numverify API: For phone number validation and
geolocation (or Twilio for additional features).
 Matplotlib or Folium: For visualizing geolocation
data on a map.
System Architecture:
1. User Input: The user will input a phone
number into the system (via GUI or command
line).
2.Validation: The system validates the format
of the phone number.
3. API Integration: If the number is valid, the system
queries an external API for information (carrier,
location, line type).
4. Data Storage: The details of the phone number
(including country, carrier, etc.) are stored in a
database.
5. Display Results: The results are displayed to the
user, either in the command line or a graphical
interface.
Final Structure:
Your project will be organized into multiple
modules:
 validation.py: Phone number validation logic.
 api_integration.py: Handles API requests and
response processing.
 database.py: Manages the SQLite database for
storing phone number data.
 gui.py: The Tkinter-based user interface for
interacting with the user.
 visualization.py: Code to visualize tracked
locations (optional).

1. Overview of the Project


The project can have multiple functionalities related to
phone number tracking. Here are some common
functionalities that we can consider:
 Phone Number Validation: Ensuring that the
phone number is in the correct format (e.g., is it a
valid phone number?).
 Geolocation/Carrier Lookup: Identifying the
location, country, or carrier of the phone number
using external APIs.
 Call Tracking: Tracking call logs associated with a
number, which typically requires an API or service
that can access this information (like Twilio, for
instance).
For this explanation, we will focus on the Phone
Number Validation and Carrier/Geolocation
Lookup using an external API (Numverify).

2. Components of the Project


a) Phone Number Validation
Validation of a phone number refers to checking if it
adheres to a particular format or international
standards. For instance:
 The phone number might need to begin with a
country code (+1 for US, +44 for UK).
 It should only contain numeric digits (excluding
spaces, hyphens, etc.).
 The length of the number should match the
expected length for the specific country.
In Python, we can use regular expressions to validate
the phone number format.
b) Phone Number Information Lookup
(Geolocation and Carrier)
Once the number is validated, we can track information
about the phone number, such as:
 Carrier: The telecommunications company that
owns the number (e.g., Verizon, AT&T).
 Location: The country or region where the phone
number is registered.
 Line Type: Whether the number is a mobile,
landline, or VoIP (Voice over IP).
To achieve this, we’ll use the Numverify API, which
provides information about the phone number in real
time. It allows us to:
 Check if the phone number is valid.
 Get details about the phone number's carrier,
country, location, and line type.

3. Steps to Build the Project


Let's break down how you would build the project:
Step 1: Install Required Libraries
For the project, we need the following libraries:
 requests: to make HTTP requests to external APIs.
 re: for phone number validation using regular
expressions.

Step 2: Set Up the API (Numverify)


1. Go to Numverify and sign up for an account.
2. After signing up, you will get an API Key that you
will use to authenticate requests.
3. You will be able to make a limited number of free
API requests per month, which is perfect for small
projects.
Step 3: Write the Python Code
We will divide the project into two main functions:
1. Phone Number Validation (Using re for regular
expressions).
2. Phone Number Geolocation & Carrier Lookup
(Using the Numverify API).
4. Explanation of Code
a) Phone Number Validation
(validate_phone_number)
This function checks if the input phone number matches
the regular expression for valid phone numbers. The
regular expression r'^\+?1?\d{9,15}$' can be broken
down as:
 ^ : The start of the string.
 \+? : Optionally matches the plus sign (+), which is
used in international phone numbers.
 1? : Optionally matches the country code 1 (e.g.,
USA).
 \d{9,15} : Matches a sequence of 9 to 15 digits
(valid phone number length).
 $ : End of the string.
If the number matches this pattern, it returns True,
meaning it's a valid phone number format.

b) Track Phone Number Details


(track_phone_number)
This function makes an API request to Numverify to get
details about the phone number. Here’s what the
function does:
1. Constructs the URL for the API request, including
the access_key (your API key) and the number (the
phone number to be checked).
2. Sends a GET request to the API and stores the
response.
3. The response is a JSON object, which we convert to
a Python dictionary using response.json().
4. If the phone number is valid, the API will return
details like the country, carrier, location, and
line type. These details are extracted from the
response and displayed to the user.
5. If the phone number is invalid or no data is
returned, the function will return None.
5. How the Program Works
 The user enters a phone number.
 The program first checks whether the number
follows the correct format (valid phone number
format).
 If valid, it makes an API call to Numverify to get
details about the phone number.
 It then prints the information (such as country,
carrier, etc.) to the user.
6. Next Steps and Enhancements
1. Extend the API:
o You could extend the project to track more
phone numbers by saving them to a file or
database.
o You could also implement a feature to track
multiple numbers at once.
2. SMS Integration:
o You could use the Twilio API to send SMS to
the phone number and track responses, or
integrate SMS verification.
3. Call Tracking:
o Integrate a service like Twilio to track calls
made to the number (using call logs).
4. User Interface (UI):
o Build a simple UI using libraries like Tkinter for
desktop apps or Flask/Django for web apps to
make it more user-friendly.
8. Important Considerations
 Privacy and Legal Considerations: Always be
cautious about using and storing phone number
data. Make sure to comply with data protection
laws like GDPR.
 API Limitations: APIs like Numverify may have
rate limits and may not be able to give detailed
information in all cases (e.g., some countries might
not have data available).
SOURCE CODE (PYTHON
PROGRAMMING)
from tkinter import *

import mysql.connector

import phonenumbers

from phonenumbers import timezone, geocoder, carrier

from tkintermapview import TkinterMapView

class Phone:

timeZone = str('')

Carrier = str('')

Region = str('')

def _init_(self):

self.home_screen()
def check_no(self) -> 'True or False':

entry_widget['highlightcolor'] = "blue"

entry_widget['highlightthickness'] = 0

try:

phone_number = phonenumbers.parse(number.get())

a = type(phone_number.national_number)

valid = phonenumbers.is_valid_number(phone_number)

possible = phonenumbers.is_possible_number(phone_number)

except:

valid_label.config(text='The number you have entered is not valid !!', fg='red')

print('the number is not vaid')

return False

finally:

if valid == True and a == int:

valid_label.config(text='The number you have entered is valid', fg='#3d9e1c')

self.get_details(phone_number)

return True

elif a != int:

valid_label.config(text='The number you have entered is not valid !!', fg='#cf3a3a')

print('the number is not vaid')

return False

else:

valid_label.config(text='The number you have entered is not valid !!', fg='red')

print('the number is not vaid')

return False
""" def find_location(self):

place_entity = locationtagger.find_locations(text=Phone.Region)

get_country = str(place_entity.countries)

print(get_country)"""

def update_values(self):

time_zone_label.config(text=f'Time Zone -- -- -- -- -- {Phone.timeZone} ')

company_label.config(text=f'Comapny -- -- -- -- -- {Phone.Carrier}')

region_label.config(text=f'Region -- -- -- -- -- {Phone.Region}')

def set_address(self, event):

map_widget.set_address(Phone.Region, marker=True)

def connection(self):

a = "127.0.0.1"

user = "root"

key = "1234"

try:

self.mydatabase = mysql.connector.connect(

host=a,

user=user,

password=key,

database="history"

self.cursor = self.mydatabase.cursor()

print('Connection Established')

except Exception:
print("Connection Failed")

def insertion(self):

self.connection()

self.cursor.execute(

"CREATE TABLE IF NOT EXISTS user_details (Timezone varchar(60), Region varchar(20),Number


int(20));")

sql = "INSERT INTO User_Details (Timezone,Region,Number) VALUES ({},{},


{})".format(Phone.timeZone, Phone.Region,

number.get())

self.cursor.execute(sql)

self.mydatabase.commit()

def get_details(self, no):

Phone.timeZone = str(timezone.time_zones_for_number(no))

Phone.Carrier = str(carrier.name_for_number(no, 'en'))

Phone.Region = str(geocoder.description_for_number(no, 'en'))

Phone.timeZone = Phone.timeZone.replace('(', '').replace(',', '').replace(')', '')

print(Phone.timeZone)

print(Phone.Carrier)

print(Phone.Region)

self.update_values()

def reset_values(self, event):


Phone.timeZone = str()

Phone.Carrier = str()

Phone.Region = str()

valid_label.config(text='', fg='#2B2B2B')

self.update_values()

def update_entry(self, event):

entry_widget['highlightcolor'] = "#960e32"

entry_widget['highlightthickness'] = 3

def home_screen(self):

global window

window = Tk()

window.geometry('1190x600')

window.title('Phone Track')

window.config(bg='#050e1c')

icon = PhotoImage(file='tracking.png')

window.wm_iconphoto(False, icon)

title = Label(window, text='Phone Tracker', fg='#DDDDDD', bg='#050e1c',

font=('Arial Rounded MT Bold', 25)).place(x=729, y=12)

a = Frame(window, height=521, width=562, bg='#0a1221').place(x=589, y=67)

Entry_text = Label(a, text='Enter your phone no. with + _ _', fg='#DDDDDD', bg='#0a1221',

font=('Roboto Regular', 14))

Entry_text.place(x=729, y=85)
global number, entry_widget

number = StringVar()

entry_widget = Entry(textvariable=number, bg='#050e1c', width=32, font=('Berlin Sans FB', 18),


fg='White',

borderwidth=0)

entry_widget.place(x=666, y=135)

entry_widget.bind('<Button>', self.update_entry)

entry_widget.bind('<Button>', self.reset_values, add='+')

global valid_label

valid_label = Label(text='', font=('Berlin Sans FB', 13), bg='#0a1221', fg='#2B2B2B')

valid_label.place(x=730, y=170)

enter_btn = Button(a, width=6, height=1, bg='#145d82', borderwidth=0, text='Enter', fg='white',

font=('Berlin Sans FB', 15), command=self.check_no)

enter_btn.place(x=828, y=210)

global time_zone_label, company_label, region_label, map_widget

time_zone_label = Label(a, text='Time Zone -- -- -- -- -- ', fg='#DDDDDD', bg='#0a1221',

font=('Bahnschrift SemiBold', 14))

time_zone_label.place(x=610, y=275)

company_label = Label(a, text='Comapny -- -- -- -- --', fg='#DDDDDD', bg='#0a1221',

font=('Bahnschrift SemiBold', 14))

company_label.place(x=610, y=345)

region_label = Label(a, text='Region -- -- -- -- --', fg='#DDDDDD', bg='#0a1221',

font=('Bahnschrift SemiBold', 14))

region_label.place(x=610, y=415)

get_location_btn = Button(a, width=11, height=1, bg='#145d82', borderwidth=0, text='Get Location',


fg='white', font=('Berlin Sans FB', 18))

get_location_btn.place(x=788, y=485)

get_location_btn.bind('<Button>', self.set_address)

map_widget = TkinterMapView(window, width=550, height=50, corner_radius=5)

map_widget.pack(fill=Y, side=LEFT, )

# Google_url

map_widget.set_tile_server('https://mt0.google.com/vt/lyrs=m&hl=en&x={x}&y={y}&z={z}&s=Ga",
max_zoom=20')

window.resizable(False, False)

window.mainloop()

a = Phone()

Conclusion:
This Phone Number Tracker project can be a comprehensive
and engaging final year project. It integrates various aspects of
Python development, including:
 API integration for real-time data fetching.
 Regular expression for validation.
 Database management to store phone numbers.
 GUI development to make the application user-friendly.

You might also like