-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
79 lines (69 loc) · 2.41 KB
/
main.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
import requests, json, socket
from multiprocessing.dummy import Pool
class Domain:
def __init__(self, domain):
self.domain = domain
def subdomains(self):
try:
r = requests.get("https://sonar.omnisint.io/subdomains/{}".format(self.domain))
result = json.loads(r.text)
print(" [{}] > [{} Domain]".format(self.domain, len(result)))
for a in result:
open('results/subdomains.txt', 'a').write('http://' + a + "\n")
except:
pass
def reverse(self):
try:
ips = socket.gethostbyname(self.domain)
r = requests.get("https://sonar.omnisint.io/reverse/{}".format(ips))
result = json.loads(r.text)
print(" [{}] > [{} Domain]".format(self.domain, len(result)))
for a in result:
open('results/reverse.txt', 'a').write('http://' + a + "\n")
except:
pass
def All(self):
try:
ips = socket.gethostbyname(self.domain)
r = requests.get("https://sonar.omnisint.io/all/{}".format(ips))
result = json.loads(r.text)
print(" [{}] > [{} Domain]".format(self.domain, len(result)))
for a in result:
open('results/all.txt', 'a').write('http://' + a + "\n")
except:
pass
def process(self):
if selection == "1":
website.subdomains()
elif selection == "2":
website.reverse()
elif selection == "3":
website.All()
else:
print(" [!] Wrong input please try again...")
def asuna(list):
global website
website = Domain(list)
website.process()
def main():
print("""
Reverse IP
Author : angga1337
[1] Subdomain
[2] Reverse IP
[3] All (Subdomain, tlds, reverse)
""")
global selection
try:
selection = input(" root@angga1337~# ")
urList = open(input(" root@weblist~# "), "r").read().replace("https://", "").replace("http://", "").replace("/", "").split("\n")
thread = int(input(" root@threads~# "))
print("\n")
pool = Pool(thread)
pool.map(asuna, urList)
pool.close()
pool.join
except:
print(" [!] Something wrong please try again...")
if __name__ == '__main__':
main()