-
Notifications
You must be signed in to change notification settings - Fork 4
/
PhoNumSpy.py
138 lines (135 loc) · 4.3 KB
/
PhoNumSpy.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
import phonenumbers
import requests
import pyfiglet
import time
from googlesearch import search
from phonenumbers.phonenumberutil import region_code_for_number
from phonenumbers import geocoder, carrier, timezone
import os
import googlesearch-python
print("\n")
Ascii_Art = pyfiglet.figlet_format("PhoNumSpy")
print(Ascii_Art)
version = "Version 1.0"
print(version)
print("\n")
time.sleep(1)
maininput = input("Input the target phone number using this format: +(prefix)(phonenumber) ES: +447455869664\n-->")
lookuptarget = maininput.strip("+")
fileoutput = open(f"{maininput}_results.txt", "w")
fileoutput.write("\n")
fileoutput.write(Ascii_Art)
fileoutput.write("\n")
fileoutput.write("\n")
fileoutput.write(version)
fileoutput.write("\n")
fileoutput.write("\n")
print("\n")
print("-------------------------")
print("Target:" + maininput)
print("-------------------------")
print("\n")
print("Processing...")
print("\n")
fileoutput.write("-------------------------")
fileoutput.write("\n")
fileoutput.write(f"Target: {maininput}")
fileoutput.write("\n")
fileoutput.write("-------------------------")
fileoutput.write("\n")
fileoutput.write("\n")
fileoutput.write("Processing...")
fileoutput.write("\n")
fileoutput.write("\n")
print("-------------------------")
print("Phone Number Informations")
print("-------------------------")
print("\n")
target = phonenumbers.parse(maininput)
TZ = timezone.time_zones_for_number(target)
print("Location: ", TZ)
CC = region_code_for_number(target)
print("Country Code: ", CC)
CR = carrier.name_for_number(target, CC)
print("Carrier: ", CR)
fileoutput.write("-------------------------")
fileoutput.write("\n")
fileoutput.write("Phone Number Informations")
fileoutput.write("\n")
fileoutput.write("-------------------------")
fileoutput.write("\n")
fileoutput.write("\n")
fileoutput.write("Location: ")
fileoutput.write(str(TZ))
fileoutput.write("\n")
fileoutput.write("Country Code: ")
fileoutput.write(str(CC))
fileoutput.write("\n")
fileoutput.write("Carrier: ")
fileoutput.write(str(CR))
fileoutput.write("\n")
fileoutput.write("\n")
print("\n")
print("--------------------------")
print("Phone Number Web Footprint")
print("--------------------------")
print("\n")
fileoutput.write("--------------------------")
fileoutput.write("\n")
fileoutput.write("Phone Number Web Footprint")
fileoutput.write("\n")
fileoutput.write("--------------------------")
fileoutput.write("\n")
fileoutput.write("\n")
footprintsearch = ""
for footprintsearch in search(lookuptarget, tld="co.in", num=10, stop=10, pause=2):
print(f"[+] Result found on: {footprintsearch}")
fileoutput.write(f"{footprintsearch}\n")
if footprintsearch == "":
print("[-] No web footprint found")
fileoutput.write("[-] No web footprint found")
print("\n")
print("--------------------------------------------------")
print("Targeted Searches on Online Phone Number Providers")
print("--------------------------------------------------")
print("\n")
fileoutput.write("\n")
fileoutput.write("------------------------------------------------")
fileoutput.write("\n")
fileoutput.write("Targeted Searches on Onine Phone Number Provider")
fileoutput.write("\n")
fileoutput.write("------------------------------------------------")
fileoutput.write("\n")
fileoutput.write("\n")
with open("websites.txt", "r") as extractedwebsites:
extractedwebsitesread = extractedwebsites.read()
varwebsites = extractedwebsitesread.splitlines()
i = 0
query = ""
querysearch = ""
while i < len(varwebsites):
query = f"allinurl:{varwebsites[i]} {lookuptarget}"
for querysearch in search(query, tld="co.in", num=1, stop=1, pause=0):
print(f"[+] Result found: {querysearch}")
fileoutput.write(f"{querysearch}\n")
if querysearch == "":
pass
i += 1
if querysearch == "":
print("[-] No result found")
fileoutput.write("[-] No result found")
print("\n")
print(Ascii_Art)
print("\n")
fileoutput.write("\n")
fileoutput.write("\n")
fileoutput.write(Ascii_Art)
fileoutput.write("\n")
fileoutput.write("\n")
fileoutput.write(version)
fileoutput.write("\n")
fileoutput.write("\n")
fileoutput.close()
filepath = os.getcwd()
filename = f"{maininput}_results.txt"
print(f"{maininput} Logs saved in {filepath} as '{filename}'")