-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathscannerweb.py
More file actions
130 lines (106 loc) · 4.26 KB
/
scannerweb.py
File metadata and controls
130 lines (106 loc) · 4.26 KB
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
from screen import screen
from hasher import hasher
from ScannerWebCore import Scanner_Web_Core
from os import getcwd
from platform import platform
from functions import startScannig, getLists, dorkSearch
from Connection import connector
from cmdparser import buildArgvSys
if __name__ == "__main__":
# SETUP
try :
options = buildArgvSys()
con = connector()
core = Scanner_Web_Core(con)
core.options = options
sc = screen(logos = Scanner_Web_Core.logos)
print(sc.getColor("bold_green"))
# BANNER
sc.prLogo()
print(":"*sc.termenalSize().columns)
sc.prInfo("Developper",sc.getColor("bold_red")+"SuicV")
sc.prInfo("Directory",getcwd())
sc.prInfo("System",sc.getColor("green")+platform())
sc.prInfo("Version",sc.getColor("yellow")+str(core.version))
print("-"*sc.termenalSize().columns)
# CHECK CONNECTION TO THE PROXY
if options.get("proxy") :
sc.prInfo("Checking Porxy",options.get("proxy"))
if con.checkProxy(options.get("proxy")) == False :
sc.prDanger("Error",sc.getColor("red")+"Connection To Proxy Is Faild")
exit()
else :
sc.prInfo("Success",sc.getColor("green")+"Connection To Proxy Is Succeed")
# CHECK FOR UPDATES
if options.get("update"):
sc.prInfo("PROCCESS","Look for updates")
if core.updateChecker():
sc.prDanger("Resulte",sc.getColor("red")+"There are a new version available, download it and enjoy !",4)
else :
sc.prSubInfo("Resulte",sc.getColor("green")+"No new version available",4)
exit()
# BASE 64 ENCRYPTATION
if options.get("base64Encr"):
sc.prInfo("PROCESS","Encrypt base64")
sc.prSubInfo("STRING",options.get("base64Encr"))
sc.prSubInfo("Base64 encypted",hasher.base64Encr(options.get("base64Encr")))
# BASE 64 DECRYPTATION
if options.get("base64Decr"):
sc.prInfo("PROCESS","Encrypt base64")
sc.prSubInfo("BASE64",options.get("base64Decr"))
sc.prSubInfo("Base64 Decrypted",hasher.base64Decr(options.get("base64Decr")))
# MD5 ENCRYPTATION
if options.get("md5Enc"):
sc.prInfo("PROCESS","Decrypt md5")
sc.prSubInfo("STRING",options.get("md5Enc"))
sc.prSubInfo("Hash encypted",hasher.md5Encr(options.get("md5Enc")))
# SCAN URL
if options.get("url"):
urls = []
sc.prInfo("SCAN TYPE",core.scanTitles.get("u"))
if type(options.get("url")) is dict :
for url in getLists(options.get("url").get("List")) :
if core.isForbiden(url) != True:
urls.append(url)
else :
urls.append(options.get("url"))
if len(urls) == 0 :
sc.prDanger("Error",sc.getColor("red")+"Urls not found or is forbiden")
exit()
startScannig(core,options,urls,options.get("proxy"))
print("-"*sc.termenalSize().columns)
# SEARCH DORK AND SCANN RESULTS
if options.get("dork"):
sc.prInfo("SCAN TYPE", core.scanTitles.get("d"))
engins = options.get("engin").split("|")
for engin in engins :
core.urlFound = []
engin = engin.lower().strip()
sc.prDanger("Engin", engin.title())
# WHEN USER SET A FILE
if type(options.get("dork")) is dict :
dorks = getLists(options.get("dork").get("List"))
sc.prInfo("Number of Dork found",len(dorks))
for dork in dorks :
core.urlFound = []
# PRINTING CURRENT DORK SCANING
print(sc.getColor("bold_yellow"),"-"*(sc.termenalSize().columns-2),sc.restarColor)
sc.prInfo("DORK",dork)
print(sc.getColor("bold_yellow"),"-"*(sc.termenalSize().columns-2),sc.restarColor)
# GETTING URLS TO SCAN
urlsFound = dorkSearch(dork,core,options.get("pages"), engin)
print(" "*sc.termenalSize().columns,end="\r")
startScannig(core, options, urlsFound, options.get("proxy"))
else :
print(sc.getColor("bold_yellow"),"-"*(sc.termenalSize().columns-2),sc.restarColor)
sc.prInfo("DORK",options.get("dork"))
print(sc.getColor("bold_yellow"),"-"*(sc.termenalSize().columns-2),sc.restarColor)
urlsFound = dorkSearch(options.get("dork"),core,options.get("pages"), engin)
print(" "*sc.termenalSize().columns,end="\r")
startScannig(core, options, urlsFound, options.get("proxy"))
# END OF SCRIPT
sc.clearLine()
print(sc.getColor("red"),"-"*(sc.termenalSize().columns-1))
except KeyboardInterrupt :
print(sc.getColor("red"),"-"*15," SCAN STOPED ","-"*15,sc.restarColor)
print(sc.getColor("bold_green")+"[ENJOY!]"+sc.restarColor)