Phone OSINT Tool
by Boat - Tuesday October 8, 2024 at 12:14 PM
#1
I have created this tool with open-source libraries, regex matching, and basic web scraping. No API integrations...

import re import requests from bs4 import BeautifulSoup import phonenumbers from phonenumbers import geocoder, carrier class PhoneOSINT:         def __init__(self, phone_number):         self.phone_number = phone_number         self.parsed_number = self.validate_phone_number()             def validate_phone_number(self):         """Validate the phone number and parse it using phonenumbers library."""         try:             parsed_number = phonenumbers.parse(self.phone_number)             if phonenumbers.is_valid_number(parsed_number):                 print(f"Phone number {self.phone_number} is valid.")                 return parsed_number             else:                 print(f"Phone number {self.phone_number} is invalid.")                 return None         except phonenumbers.phonenumberutil.NumberParseException:             print("Invalid phone number format.")             return None         def get_carrier_information(self):         """Retrieve carrier information if available."""         if self.parsed_number:             carrier_info = carrier.name_for_number(self.parsed_number, "en")             if carrier_info:                 print(f"Carrier: {carrier_info}")             else:                 print("Carrier information not available.")         def get_geolocation(self):         """Get approximate geolocation based on the country and region of the phone number."""         if self.parsed_number:             location = geocoder.description_for_number(self.parsed_number, "en")             if location:                 print(f"Geolocation: {location}")             else:                 print("Geolocation information not available.")         def social_media_lookup(self):         """Attempt a social media lookup by constructing search URLs for major platforms."""         base_urls = [             f"https://www.facebook.com/search/top/?q={self.phone_number}",             f"https://www.linkedin.com/search/results/people/?keywords={self.phone_number}",             f"https://twitter.com/search?q={self.phone_number}"         ]         print("Potential social media profiles:")         for url in base_urls:             print(url)     def reverse_phone_lookup(self):         """Attempt a reverse phone lookup by scraping Google search results."""         search_url = f"https://www.google.com/search?q={self.phone_number}"         print(f"Performing reverse phone lookup by scraping Google for: {self.phone_number}")                 headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'}         response = requests.get(search_url, headers=headers)         soup = BeautifulSoup(response.text, 'html.parser')                 for result in soup.find_all('h3'):             print(result.text)         def historical_data_lookup(self):         """Simulate historical data lookup using DuckDuckGo search."""         search_url = f"https://duckduckgo.com/html?q={self.phone_number}+historical+records"         print(f"Performing historical data lookup on DuckDuckGo for: {self.phone_number}")                 headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'}         response = requests.get(search_url, headers=headers)         soup = BeautifulSoup(response.text, 'html.parser')                 for result in soup.find_all('a', {'class': 'result__a'}):             print("Historical record:", result.get_text())             print("Link:", result['href'])     def email_association_lookup(self):         """Look for possible email addresses associated with this phone number."""         search_url = f"https://www.google.com/search?q={self.phone_number}+email"         print(f"Searching for email associations on Google for: {self.phone_number}")                 headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'}         response = requests.get(search_url, headers=headers)         soup = BeautifulSoup(response.text, 'html.parser')                 email_pattern = re.compile(r'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}')         emails = set(email_pattern.findall(response.text))                 print("Potential associated emails:")         for email in emails:             print(email)     def run_all_checks(self):         """Run all the functions for a comprehensive check."""         print(f"Running OSINT checks for phone number: {self.phone_number}")         self.get_carrier_information()         self.get_geolocation()         self.social_media_lookup()         self.reverse_phone_lookup()         self.historical_data_lookup()         self.email_association_lookup() # Example usage phone_osint = PhoneOSINT("+14155552671") phone_osint.run_all_checks()
Reply
#2
This is cool, thanks, I like reading what other people build
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  (FREE) OSINT TOOLS + DATABASE SEARCH ENGINES xpjelly 832 17,354 1 hour ago
Last Post: sinolps
  OSINT Tools on the web hashdash 107 2,856 06-19-2026, 09:28 PM
Last Post: AKSH666
  [FREE] PHONE NUMBERS FOR SMS VERIFICATION lulagain 395 10,411 03-28-2026, 06:47 PM
Last Post: clayfuk
  [Free] OSINT Websites/ Dump thejaeger123 760 47,567 02-10-2026, 07:25 PM
Last Post: Unstoppable1
  HOW TO CREATE UNLIMITED PHONE NUMBERS OF ANY COUNTRY secur3ra8 1,080 90,000 02-09-2026, 08:25 AM
Last Post: laher36105



 Users browsing this thread: 1 Guest(s)