17
17
#
18
18
#
19
19
20
- from concurrent .futures import ThreadPoolExecutor as executor
20
+ from concurrent .futures import ThreadPoolExecutor as executor # pip install futures
21
21
from Wappalyzer import Wappalyzer , WebPage # pip install python-Wappalyzer
22
22
import urllib3 , argparse
23
23
24
24
urllib3 .disable_warnings (urllib3 .exceptions .InsecureRequestWarning ) # disable Python SSL warnings !
25
25
26
- yellow = "\033 [93m"
27
26
green = "\033 [32m"
28
27
blue = "\033 [34m"
29
28
red = "\033 [31m"
45
44
46
45
47
46
48
- def check (ig , url ):
47
+ def check (out , ig , url ):
49
48
if not url .startswith ('http' ):
50
49
url = 'http://' + url
51
50
try :
52
51
webpage = WebPage .new_from_url (url )
53
52
tech = wappalyzer .analyze (webpage )
54
- print (yellow + "[+] " + str (url ) + end + bold + " | " + green + ", " .join (tech ) + end )
53
+ print ("[+] " + str (url ) + " | " + green + bold + " - " .join (tech ) + end )
54
+ if out != 'None' :
55
+ with open (out , 'a' ) as f :
56
+ f .write (url + " | " + " - " .join (tech ) + "\n " )
57
+ f .close ()
58
+
55
59
except Exception as e :
56
60
if ig == 'True' :
57
61
pass
58
62
else :
59
- print (red + "Error: " + end + "[ " + bold + str (url ) + end + " ] | " + str (e ))
63
+ print (red + "Error: " + end + "[ " + bold + str (url ) + end + " ] > " + str (e ))
60
64
61
65
62
66
parser = argparse .ArgumentParser ()
63
67
parser .add_argument ("-w" , "--wordlist" , help = "Domains List File" , type = str , required = True )
64
68
parser .add_argument ("-t" , "--thread" , help = "Theads Number - (Default: 10)" , type = int )
65
69
parser .add_argument ("-i" , "--ignore" , help = "To Ignore The Errors" , action = 'store_true' )
70
+ parser .add_argument ("-o" , "--output" , help = "Save The Results To a File" , type = str )
66
71
67
72
args = parser .parse_args ()
68
73
69
74
links = str (args .wordlist )
70
75
threads = str (args .thread )
71
76
ig = str (args .ignore )
77
+ out = str (args .output )
72
78
73
79
lines = len (open (links ).readlines ())
74
80
@@ -77,6 +83,7 @@ def check(ig, url):
77
83
78
84
print (blue + "[" + red + "+" + blue + "] File: " + end + links )
79
85
print (blue + "[" + red + "+" + blue + "] Length: " + end + str (lines ))
86
+ print (blue + "[" + red + "+" + blue + "] Output: " + end + str (out ))
80
87
print (blue + "[" + red + "+" + blue + "] Threads: " + end + str (threads ))
81
88
print (blue + "[" + red + "+" + blue + "] Ignore: " + end + str (ig ))
82
89
@@ -85,5 +92,5 @@ def check(ig, url):
85
92
86
93
urls = open (links ,'r' )
87
94
with executor (max_workers = int (threads )) as exe :
88
- [exe .submit (check , ig , url .strip ('\n ' )) for url in urls ]
95
+ [exe .submit (check , out , ig , url .strip ('\n ' )) for url in urls ]
89
96
0 commit comments