-
Notifications
You must be signed in to change notification settings - Fork 0
/
multi_tool_recon.py
60 lines (47 loc) · 1.91 KB
/
multi_tool_recon.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
import subprocess
import optparse
import multiprocessing
import time
start_time = time.time()
def get_user_input():
parse_object=optparse.OptionParser()
parse_object.add_option("-d", "--domain",dest="domain",help="target domain")
return parse_object.parse_args()
def run_dnsrecon(domain):
try:
result = subprocess.run(["dnsrecon","-d", domain],stdout=subprocess.PIPE,stderr=subprocess.PIPE, check=True)
print("-------------------Runnig DNSRecon-------------------")
print(result.stdout.decode())
print("----------------------Ending Result DNSRecon----------------------")
except:
print(result.stderr.decode())
def run_sublist3r(domain):
try:
result =subprocess.run(["sublist3r","-d",domain],stdout=subprocess.PIPE,stderr=subprocess.PIPE,check=True)
print("-------------------Running Sublist3r-------------------")
print(result.stdout.decode())
print("----------------------Ending Result Sublist3r----------------------")
except:
print(result.stderr.decode())
def run_whois(domain):
try:
result =subprocess.run(["whois",domain],stdout=subprocess.PIPE,stderr=subprocess.PIPE,check=True)
print("-------------------Runinnig Whois------------------")
print(result.stdout.decode())
print("----------------------Ending Result Whois----------------------")
except:
print(result.stderr.decode())
def main():
(user_inputs,arguments) = get_user_input()
p1 = multiprocessing.Process(target=run_dnsrecon,args=(user_inputs.domain,))
p2 = multiprocessing.Process(target=run_sublist3r,args=(user_inputs.domain,))
p3 = multiprocessing.Process(target=run_whois,args=(user_inputs.domain,))
p1.start()
p2.start()
p3.start()
p1.join()
p2.join()
p3.join()
if __name__=="__main__":
main()
print("--- Total time: %s seconds ---" % (time.time() - start_time))