www.i4info.org

i4info Provides the best hacking Material. Latest hacking tutorials and tools are available here. It is the best place for hackers.

Latest topics

» Teen Patti Gold Hack & 3 Patti Chips Code Extra Bonus 2016
Sun Jan 15, 2017 10:13 pm by printexpk1

» SQL Dumper v.8.0
Fri Jan 13, 2017 10:18 pm by imsopickled

» Infographic Resume/CV Pack
Fri Jan 06, 2017 2:55 pm by Admin

» My Dear Love
Tue Jan 03, 2017 2:24 pm by Admin

» 2017 Calendar | One Page Calendar
Sun Jan 01, 2017 9:03 am by Admin

» Diagnosing Traffic Drops Using Google Analytics
Fri Dec 30, 2016 11:59 am by Admin

» British/UK Passport PSD
Thu Dec 29, 2016 4:03 pm by Admin

» PHP Mailer - Mass Emails All in inbox 2017
Thu Dec 29, 2016 3:55 pm by Admin

» How to Close any Facebook Account?
Wed Dec 28, 2016 10:51 am by Admin

January 2017

MonTueWedThuFriSatSun
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Calendar Calendar

Affiliates


free forum

Forumotion on Facebook Forumotion on Twitter Forumotion on YouTubeForumotion on Google+

Visitors Counter


Flag Counter

About Author

Muhammad Shahroze Rashid
i4info
Web Developer
Web Developer & Designer,Researcher and Technical writer. An Information Security Consultant and System Auditor, a keen Security researcher.
samanabad
lahore, Punjab
54000
Pakistan
shahrozerashid007@gmail.com
03064904829
DOB: 05/25/1992
Muhammad Shahroze Rashid
Muhammad Shahroze Rashid is a Web Developer and Designer, Android Developer, InfoGrapher, IT consultant and Researcher
Reviewed by Google
Google
Date published: 01/19/2016
9 / 10 stars
Muhammad Shahroze Rashid
Muhammad Shahroze Rashid Web Developer & Designer,Researcher and Technical writer. An Information Security Consultant and System Audito
samanabad
lahore
Punjab
54000
Pakistan

Phone Tracker python script

Share

Admin
Admin

Posts : 469
Reputation : 6
Join date : 2014-12-10
Age : 24
Location : Pakistan

Phone Tracker python script

Post by Admin on Wed Mar 04, 2015 1:58 pm

PhoneTrak
Phone Lookup Tool (CLI)
Coded in Python 3.3.2


This will retrieve the carrier or service provider they use, as well as the SMS gateway address. Here is a screenshot of the results :




USAGE
The usage is simple, it is a command line program, so it takes arguments.


SOURCE CODE




# Phone Number Lookup Tool
# Version 1.0.0
# Coded in Python 3.3.2

#IMPORTS
import re
import sys
import urllib.request

#BYTE CONTROL
def encodeString(string) : return string.encode('utf-8')
def decodeString(string) : return string.decode('utf-8')

#DEBUG MESSAGES
def action(msg) : print('[#] - ' + msg)
def alert(msg) : print('[+] - ' + msg)
def error(msg) : print('[!] - ' + msg)
def errorExit(msg) : raise SystemExit('[!] - ' + msg)

#GET BETWEEN
def getBetween(source, start, stop):
search = encodeString(start + '(.*?)' + stop)
data = re.compile(search).search(source)
if data:
found = decodeString(data.group(1))
return found.replace('\n', '')
else:
return False

#GET CARRIER
def getCarrier(number):
source = urllib.request.urlopen('http://www.fonefinder.net/findome.php?npa=' + number[:3] + '&nxx=' + number[3:6] + '&thoublock=' + number[6:]).read()
carrier = getBetween(source, '</A><TD><A HREF=\'http://fonefinder.net/', '\'>')
if carrier == 'att.php':
alert('Carrier : AT&T')
alert('SMS Gateway : ' + number + '@txt.att.net')
elif carrier == 'metropcs.php':
alert('Carrier : Metro PCS')
alert('SMS Gateway : ' + number + '@mymetropcs.com')
elif carrier == 'sprint.php':
alert('Carrier : Sprint')
alert('SMS Gateway : ' + number + '@messaging.sprintpcs.com')
elif carrier == 'tmobile.php':
alert('Carrier : T-Mobile')
alert('SMS Gateway : ' + number + '@tmomail.net')
elif carrier == 'verizon.php':
alert('Carrier : Verizon')
alert('SMS Gateway : ' + number + '@vtext.com')
else:
errorExit('Carrier : Unknown')
errorExit('SMS Gateway : Unknown')

#VERIFY PHONE
def verifyPhone(number):
if len(number) == 10 and number.isdigit() == True:
return True
else:
return False

#VERSION CHECK
def versionCheck():
if sys.version_info.major != 3 or sys.version_info.minor != 3:
errorExit('Requires Python version 3.3 to be installed.')

#START
if len(sys.argv) != 2:
error('Missing command line arguments!')
errorExit('Usage : phonetrak.py <number>')
number = sys.argv[1]
if verifyPhone(number) == True:
try:
getCarrier(number)
except:
errorExit('Failed to retrieve carrier!')
else:
error('Invalid phone number!')
errorExit('Usage : phonetrak.py <number>')






 

    Current date/time is Mon Jan 23, 2017 11:39 am