├── .gitignore ├── LICENSE ├── README.md ├── location.html └── main.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | .idea 6 | 7 | # C extensions 8 | *.so 9 | 10 | # Distribution / packaging 11 | .Python 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | wheels/ 24 | pip-wheel-metadata/ 25 | share/python-wheels/ 26 | *.egg-info/ 27 | .installed.cfg 28 | *.egg 29 | MANIFEST 30 | 31 | # PyInstaller 32 | # Usually these files are written by a python script from a template 33 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 34 | *.manifest 35 | *.spec 36 | 37 | # Installer logs 38 | pip-log.txt 39 | pip-delete-this-directory.txt 40 | 41 | # Unit test / coverage reports 42 | htmlcov/ 43 | .tox/ 44 | .nox/ 45 | .coverage 46 | .coverage.* 47 | .cache 48 | nosetests.xml 49 | coverage.xml 50 | *.cover 51 | *.py,cover 52 | .hypothesis/ 53 | .pytest_cache/ 54 | 55 | # Translations 56 | *.mo 57 | *.pot 58 | 59 | # Django stuff: 60 | *.log 61 | local_settings.py 62 | db.sqlite3 63 | db.sqlite3-journal 64 | 65 | # Flask stuff: 66 | instance/ 67 | .webassets-cache 68 | 69 | # Scrapy stuff: 70 | .scrapy 71 | 72 | # Sphinx documentation 73 | docs/_build/ 74 | 75 | # PyBuilder 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | .python-version 87 | 88 | # pipenv 89 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 90 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 91 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 92 | # install all needed dependencies. 93 | #Pipfile.lock 94 | 95 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 96 | __pypackages__/ 97 | 98 | # Celery stuff 99 | celerybeat-schedule 100 | celerybeat.pid 101 | 102 | # SageMath parsed files 103 | *.sage.py 104 | 105 | # Environments 106 | .env 107 | .venv 108 | env/ 109 | venv/ 110 | ENV/ 111 | env.bak/ 112 | venv.bak/ 113 | 114 | # Spyder project settings 115 | .spyderproject 116 | .spyproject 117 | 118 | # Rope project settings 119 | .ropeproject 120 | 121 | # mkdocs documentation 122 | /site 123 | 124 | # mypy 125 | .mypy_cache/ 126 | .dmypy.json 127 | dmypy.json 128 | 129 | # Pyre type checker 130 | .pyre/ 131 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Md. Ridoy Hossain 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Phone Number Location Tracker using Python 3 | 4 | Are you curious about the location of a mobile number? Maybe you want to track a lost phone or keep tabs on your child's whereabouts. Whatever your reason, you can use Python to find the location of a mobile number. 5 | 6 | In this step-by-step guide, we'll show you how to track a mobile number's location using Python. You'll need some Python coding skills and access to a few geolocation libraries. Let's get started! 7 | 8 | To make this project only you need to follow this step:- 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | ## Installation 18 | 19 | Install package with pip 20 | 21 | ```bash 22 | pip install phonenumbers 23 | pip install folium 24 | pip install geocoder 25 | pip install opencage 26 | ``` 27 | 28 | Now need to collect Geocoder API Key from https://opencagedata.com/ 29 | 30 | Step1: Need to log in or sign up 31 | 32 |  33 | 34 | Step2: Need to click Geocoding API 35 | 36 |  37 | 38 | Step3: From API Keys collect API key 39 | 40 |  41 | 42 | 43 | 44 | 45 | ## Deployment 46 | 47 | To deploy this project run 48 | 49 | ```bash 50 | import phonenumbers 51 | from phonenumbers import geocoder 52 | from phonenumbers import carrier 53 | import opencage 54 | from opencage.geocoder import OpenCageGeocode 55 | import folium 56 | 57 | 58 | key = "your key" #Geocoder API Key need to paste here "your key" 59 | number = input("please giver your number: ") 60 | new_number = phonenumbers.parse(number) 61 | location = geocoder.description_for_number(new_number, "en") 62 | print(location) 63 | 64 | service_name = carrier.name_for_number(new_number,"en") 65 | print(service_name) 66 | 67 | geocoder = OpenCageGeocode(key) 68 | query = str(location) 69 | result = geocoder.geocode(query) 70 | #print(result) 71 | 72 | lat = result[0]['geometry']['lat'] 73 | lng = result[0]['geometry']['lng'] 74 | 75 | print(lat,lng) 76 | 77 | my_map = folium.Map(location=[lat,lng], zoom_start=9) 78 | folium.Marker([lat, lng], popup= location).add_to(my_map) 79 | 80 | my_map.save("location.html") 81 | 82 | print("location tracking completed") 83 | print("Thank you") 84 | ``` 85 | 86 | 87 | You can follow me 88 | 89 | Facebook:- https://www.facebook.com/problemsolvewithridoy/ 90 | 91 | Linkedin:- https://www.linkedin.com/in/ridoyhossain/ 92 | 93 | YouTube:- https://www.youtube.com/@problemsolvewithridoy 94 | 95 | If you have any confusion, please feel free to contact me. 96 | Thank you 97 | 98 | ⚠️⚠️⚠️ Attention Please ⚠️⚠️⚠️ 99 | 100 | Tracking the location of a phone number typically involves using specialized services or apps that can access databases and provide information on the general geographic location of a phone. However, it's important to note that tracking someone's location without their explicit consent can raise ethical and legal concerns. 101 | 102 | Here are some common methods used for tracking phone number locations: 103 | 104 | 1. Mobile Tracking Apps: There are several apps available that claim to track phone numbers. Some require installation on the target device, while others might use different methods like phone number databases or social media profiles to provide location information. 105 | 106 | 2. Reverse Phone Lookup Services: Websites or services like Truecaller, Whitepages, or Spokeo offer reverse phone lookup services. They might provide information on the registered location of a phone number based on public records or user-contributed data. 107 | 108 | 3. GPS Tracking Services: Certain apps or services allow you to track the location of family members or devices with their consent. For example, Find My iPhone for Apple devices or Google's Find My Device for Android devices can help locate a device linked to a specific account. 109 | 110 | 4. Telecom Service Providers: In some cases, telecom service providers might offer location tracking services for authorized purposes like finding a lost device or for legal investigations. This is usually done with proper authorization and legal documentation. 111 | 112 | Remember, accessing someone's location without their consent can infringe upon their privacy and might be illegal in some jurisdictions. Always ensure you have permission or legal authorization before attempting to track someone's location. 113 | 114 | If you're trying to locate a lost device or have concerns about someone's safety, it's often best to involve the authorities or use legitimate methods designed for such situations. 115 | 116 | Note:- This project was developed solely for entertainment purposes. Moreover, this particular method is ineffective. Thank you 117 | -------------------------------------------------------------------------------- /location.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 27 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 90 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import phonenumbers 2 | from phonenumbers import geocoder 3 | from phonenumbers import carrier 4 | import opencage 5 | from opencage.geocoder import OpenCageGeocode 6 | import folium 7 | 8 | 9 | key = "your key" #Geocoder API Key needs to paste here "your key" 10 | number = input("please giver your number: ") 11 | new_number = phonenumbers.parse(number) 12 | location = geocoder.description_for_number(new_number, "en") 13 | print(location) 14 | 15 | service_name = carrier.name_for_number(new_number,"en") 16 | print(service_name) 17 | 18 | geocoder = OpenCageGeocode(key) 19 | query = str(location) 20 | result = geocoder.geocode(query) 21 | #print(result) 22 | 23 | lat = result[0]['geometry']['lat'] 24 | lng = result[0]['geometry']['lng'] 25 | 26 | print(lat,lng) 27 | 28 | my_map = folium.Map(location=[lat,lng], zoom_start=9) 29 | folium.Marker([lat, lng], popup= location).add_to(my_map) 30 | 31 | my_map.save("location.html") 32 | 33 | print("location tracking completed") 34 | print("Thank you") 35 | --------------------------------------------------------------------------------