-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsub-finder.py
69 lines (51 loc) · 2.11 KB
/
sub-finder.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
import requests
import sys
import resolver
import threading
import time
print(r"""
_____ _ ______ _ _
/ ____| | | | ____| (_) | |
| (___ _ _ | |__ ______ | |__ _ _ __ __| | ___ _ __
\___ \ | | | | | '_ \ |______| | __| | | | '_ \ / _` | / _ \ | '__|
____) | | |_| | | |_) | | | | | | | | | | (_| | | __/ | |
|_____/ \__,_| |_.__/ |_| |_| |_| |_| \__,_| \___| |_|
""")
print("\n****************************************************************")
print("\n* Copyright of Sakibul Ali Khan. *")
print("\n* Twitter: https://twitter.com/sakibulalikhan *")
print("\n* Linkedin: https://www.linkedin.com/in/sakibulalikhan *")
print("\n****************************************************************")
print("\n")
domain = input("Enter domain name: ")
def check_host(self, host):
is_valid = False
Resolver = dns.resolver.Resolver()
Resolver.nameservers = ['1.1.1.1', '1.0.0.1']
self.lock.acquire()
try:
ip = Resolver.query(host, 'A')[0].to_text()
if ip:
if self.verbose:
self.print_("%s%s: %s%s" % (R, self.engine_name, W, host))
is_valid = True
self.live_subdomains.append(host)
except:
pass
self.lock.release()
return is_valid
sub_list = open("subdomains-10000.txt").read()
subs = sub_list.splitlines()
for sub in subs:
domian = f"http://{sub}.{domain}"
try:
requests.get(domian)
except requests.ConnectionError:
pass
else:
print("\nValid subdomain: ",domian)
def domain(self):
time.sleep(0.2)
def __domain__(self):
t = threading.Thread(target=self.domain)
t.start()