TheSilent 0.0.332__tar.gz → 0.0.334__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {TheSilent-0.0.332 → TheSilent-0.0.334}/PKG-INFO +1 -1
- {TheSilent-0.0.332 → TheSilent-0.0.334}/pyproject.toml +1 -1
- TheSilent-0.0.334/src/TheSilent/link_scanner.py +172 -0
- TheSilent-0.0.334/src/TheSilent/sql_injection_scanner.py +442 -0
- TheSilent-0.0.334/src/TheSilent/web_scanner.py +33 -0
- TheSilent-0.0.334/src/TheSilent/xss_scanner.py +304 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent.egg-info/PKG-INFO +1 -1
- TheSilent-0.0.332/src/TheSilent/link_scanner.py +0 -279
- TheSilent-0.0.332/src/TheSilent/sql_injection_scanner.py +0 -444
- TheSilent-0.0.332/src/TheSilent/web_scanner.py +0 -48
- TheSilent-0.0.332/src/TheSilent/xss_scanner.py +0 -294
- {TheSilent-0.0.332 → TheSilent-0.0.334}/README.md +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/setup.cfg +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/TheSilent.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/__init__.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/arp_void.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/av.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/brute_force_hash.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/clear.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/command_scanner.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/dictionary_hash.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/email_scanner.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/form_scanner.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/ftp_cracker.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/hex_viewer.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/html_lint.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/login_cracker.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/osint.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/packet_sniffer.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/return_user_agent.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/secure_overwrite.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/source_code_viewer.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/subdomain_scanner.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/subdomain_takeover.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent/wizard.py +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent.egg-info/SOURCES.txt +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent.egg-info/dependency_links.txt +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent.egg-info/requires.txt +0 -0
- {TheSilent-0.0.332 → TheSilent-0.0.334}/src/TheSilent.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: TheSilent
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.334
|
|
4
4
|
Summary: Python penetration testing, osint, and digital forensics multi tool!
|
|
5
5
|
Author-email: Michael Mueller <michael.j.mueller.pro@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/Invizabel/The-Silent
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import hashlib
|
|
2
|
+
import re
|
|
3
|
+
import sys
|
|
4
|
+
import time
|
|
5
|
+
import requests
|
|
6
|
+
from TheSilent.clear import clear
|
|
7
|
+
from TheSilent.return_user_agent import return_user_agent
|
|
8
|
+
|
|
9
|
+
CYAN = "\033[1;36m"
|
|
10
|
+
RED = "\033[1;31m"
|
|
11
|
+
|
|
12
|
+
tor_proxy = {"http": "socks5h://localhost:9050", "https": "socks5h://localhost:9050"}
|
|
13
|
+
|
|
14
|
+
# create html sessions object
|
|
15
|
+
web_session = requests.Session()
|
|
16
|
+
|
|
17
|
+
# fake user agent
|
|
18
|
+
user_agent = {"User-Agent": return_user_agent()}
|
|
19
|
+
|
|
20
|
+
# increased security
|
|
21
|
+
requests.packages.urllib3.disable_warnings()
|
|
22
|
+
requests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS += ":HIGH:!DH:!aNULL"
|
|
23
|
+
|
|
24
|
+
# increased security
|
|
25
|
+
try:
|
|
26
|
+
requests.packages.urllib3.contrib.pyopenssl.util.ssl_.DEFAULT_CIPHERS += ":HIGH:!DH:!aNULL"
|
|
27
|
+
|
|
28
|
+
except AttributeError:
|
|
29
|
+
pass
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def link_scanner(url, secure=True, tor=False, delay=1):
|
|
33
|
+
clear()
|
|
34
|
+
|
|
35
|
+
if secure:
|
|
36
|
+
my_secure = "https://"
|
|
37
|
+
|
|
38
|
+
else:
|
|
39
|
+
my_secure = "http://"
|
|
40
|
+
|
|
41
|
+
hash_list = []
|
|
42
|
+
website_list = []
|
|
43
|
+
visited_list = []
|
|
44
|
+
|
|
45
|
+
website_list.append(my_secure + url)
|
|
46
|
+
tracker = -1
|
|
47
|
+
|
|
48
|
+
while True:
|
|
49
|
+
time.sleep(delay)
|
|
50
|
+
|
|
51
|
+
length_count = 0
|
|
52
|
+
tracker += 1
|
|
53
|
+
website_list = list(set(website_list))
|
|
54
|
+
|
|
55
|
+
# checks whether a url is valid
|
|
56
|
+
valid_url_count = -1
|
|
57
|
+
|
|
58
|
+
while True:
|
|
59
|
+
try:
|
|
60
|
+
valid_url_count += 1
|
|
61
|
+
for i in website_list[valid_url_count].lower():
|
|
62
|
+
valid_regex = re.search("[\d\w\-\?\.=:/&]", i)
|
|
63
|
+
|
|
64
|
+
if not valid_regex or "script" in website_list[valid_url_count]:
|
|
65
|
+
website_list.pop(valid_url_count)
|
|
66
|
+
valid_url_count -= 1
|
|
67
|
+
break
|
|
68
|
+
|
|
69
|
+
except IndexError:
|
|
70
|
+
break
|
|
71
|
+
|
|
72
|
+
# start checking for urls
|
|
73
|
+
visited = False
|
|
74
|
+
for visits in visited_list:
|
|
75
|
+
try:
|
|
76
|
+
if visits == website_list[tracker]:
|
|
77
|
+
visited = True
|
|
78
|
+
|
|
79
|
+
except IndexError:
|
|
80
|
+
break
|
|
81
|
+
|
|
82
|
+
if not visited:
|
|
83
|
+
try:
|
|
84
|
+
if tor:
|
|
85
|
+
stream_boolean = web_session.get(website_list[tracker], verify=False, headers=user_agent, proxies=tor_proxy, timeout=(60,120), stream=True)
|
|
86
|
+
|
|
87
|
+
for i in stream_boolean.iter_lines():
|
|
88
|
+
length_count += len(i)
|
|
89
|
+
|
|
90
|
+
else:
|
|
91
|
+
stream_boolean = web_session.get(website_list[tracker], verify=False, headers=user_agent, timeout=(5,30), stream=True)
|
|
92
|
+
|
|
93
|
+
for i in stream_boolean.iter_lines():
|
|
94
|
+
length_count += len(i)
|
|
95
|
+
|
|
96
|
+
except IndexError:
|
|
97
|
+
break
|
|
98
|
+
|
|
99
|
+
except:
|
|
100
|
+
print(RED + "ERROR! " + website_list[tracker])
|
|
101
|
+
website_list.pop(tracker)
|
|
102
|
+
tracker -= 1
|
|
103
|
+
continue
|
|
104
|
+
|
|
105
|
+
if length_count <= 100000000:
|
|
106
|
+
try:
|
|
107
|
+
print(CYAN + website_list[tracker])
|
|
108
|
+
|
|
109
|
+
if tor:
|
|
110
|
+
my_request = web_session.get(website_list[tracker], verify=False, headers=user_agent, proxies=tor_proxy, timeout=(60,120)).text
|
|
111
|
+
|
|
112
|
+
else:
|
|
113
|
+
my_request = web_session.get(website_list[tracker], verify=False, headers=user_agent, timeout=(5,30)).text
|
|
114
|
+
|
|
115
|
+
page_hash = hashlib.sha3_512(my_request.encode("utf8")).hexdigest()
|
|
116
|
+
|
|
117
|
+
already_visited = False
|
|
118
|
+
|
|
119
|
+
for hashes in hash_list:
|
|
120
|
+
if hashes == page_hash:
|
|
121
|
+
already_visited = True
|
|
122
|
+
visited_list.append(website_list[tracker])
|
|
123
|
+
website_list.pop(tracker)
|
|
124
|
+
tracker -= 1
|
|
125
|
+
break
|
|
126
|
+
|
|
127
|
+
if already_visited == False:
|
|
128
|
+
visited_list.append(website_list[tracker])
|
|
129
|
+
|
|
130
|
+
hash_list.append(page_hash)
|
|
131
|
+
|
|
132
|
+
http_url = re.findall("http://\S+|https://", my_request)
|
|
133
|
+
for links in http_url:
|
|
134
|
+
if url in links:
|
|
135
|
+
website_list.append(links)
|
|
136
|
+
|
|
137
|
+
javascript_url = re.findall("[\"\'](/\S+)[\"\']", my_request)
|
|
138
|
+
for links in javascript_url:
|
|
139
|
+
if url in links:
|
|
140
|
+
website_list.append(links)
|
|
141
|
+
|
|
142
|
+
href_url = re.findall("href=[\"\'](\S+)[\"\']", my_request)
|
|
143
|
+
for links in href_url:
|
|
144
|
+
if "http://" in links or "https://" in links:
|
|
145
|
+
if url in links:
|
|
146
|
+
website_list.append(links)
|
|
147
|
+
|
|
148
|
+
elif links.startswith("/"):
|
|
149
|
+
website_list.append(my_secure + url + links)
|
|
150
|
+
|
|
151
|
+
else:
|
|
152
|
+
website_list.append(my_secure + url + "/" + links)
|
|
153
|
+
|
|
154
|
+
src_url = re.findall("src=[\"\'](\S+)[\"\']", my_request)
|
|
155
|
+
for links in src_url:
|
|
156
|
+
if "http://" in links or "https://" in links:
|
|
157
|
+
if url in links:
|
|
158
|
+
website_list.append(links)
|
|
159
|
+
|
|
160
|
+
elif links.startswith("/"):
|
|
161
|
+
website_list.append(my_secure + url + links)
|
|
162
|
+
|
|
163
|
+
else:
|
|
164
|
+
website_list.append(my_secure + url + "/" + links)
|
|
165
|
+
|
|
166
|
+
except:
|
|
167
|
+
continue
|
|
168
|
+
|
|
169
|
+
website_list = list(set(website_list[:]))
|
|
170
|
+
print(CYAN + "")
|
|
171
|
+
clear()
|
|
172
|
+
return website_list
|
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
import re
|
|
2
|
+
import time
|
|
3
|
+
import urllib.parse
|
|
4
|
+
import requests
|
|
5
|
+
from TheSilent.clear import clear
|
|
6
|
+
from TheSilent.form_scanner import form_scanner
|
|
7
|
+
from TheSilent.link_scanner import link_scanner
|
|
8
|
+
from TheSilent.return_user_agent import return_user_agent
|
|
9
|
+
|
|
10
|
+
CYAN = "\033[1;36m"
|
|
11
|
+
GREEN = "\033[0;32m"
|
|
12
|
+
RED = "\033[1;31m"
|
|
13
|
+
|
|
14
|
+
# create html sessions object
|
|
15
|
+
web_session = requests.Session()
|
|
16
|
+
|
|
17
|
+
tor_proxy = {"http": "socks5h://localhost:9050", "https": "socks5h://localhost:9050"}
|
|
18
|
+
|
|
19
|
+
# increased security
|
|
20
|
+
requests.packages.urllib3.disable_warnings()
|
|
21
|
+
requests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS += ":HIGH:!DH:!aNULL"
|
|
22
|
+
|
|
23
|
+
# increased security
|
|
24
|
+
try:
|
|
25
|
+
requests.packages.urllib3.contrib.pyopenssl.util.ssl_.DEFAULT_CIPHERS += ":HIGH:!DH:!aNULL"
|
|
26
|
+
|
|
27
|
+
except AttributeError:
|
|
28
|
+
pass
|
|
29
|
+
|
|
30
|
+
# scans for xss
|
|
31
|
+
def sql_injection_scanner(url, secure=True, tor=False, delay=1):
|
|
32
|
+
clear()
|
|
33
|
+
|
|
34
|
+
if url.startswith("https://") or url.startswith("http://"):
|
|
35
|
+
if url.count("/") == 2:
|
|
36
|
+
if url.endswith("/"):
|
|
37
|
+
my_url = url
|
|
38
|
+
|
|
39
|
+
else:
|
|
40
|
+
my_url = url + "/"
|
|
41
|
+
|
|
42
|
+
else:
|
|
43
|
+
my_url = url
|
|
44
|
+
|
|
45
|
+
else:
|
|
46
|
+
if secure:
|
|
47
|
+
if url.count("/") == 0:
|
|
48
|
+
if url.endswith("/"):
|
|
49
|
+
my_url = "https://" + url
|
|
50
|
+
|
|
51
|
+
else:
|
|
52
|
+
my_url = "https://" + url + "/"
|
|
53
|
+
|
|
54
|
+
else:
|
|
55
|
+
my_url = "https://" + url
|
|
56
|
+
|
|
57
|
+
else:
|
|
58
|
+
if url.count("/") == 0:
|
|
59
|
+
if url.endswith("/"):
|
|
60
|
+
my_url = "http://" + url
|
|
61
|
+
|
|
62
|
+
else:
|
|
63
|
+
my_url = "http://" + url + "/"
|
|
64
|
+
|
|
65
|
+
else:
|
|
66
|
+
my_url = "http://" + url
|
|
67
|
+
|
|
68
|
+
if my_url.startswith("https://"):
|
|
69
|
+
secure = True
|
|
70
|
+
new_url = my_url[8:-1]
|
|
71
|
+
|
|
72
|
+
else:
|
|
73
|
+
secure = False
|
|
74
|
+
new_url = my_url[7:-1]
|
|
75
|
+
|
|
76
|
+
crawl_list = []
|
|
77
|
+
crawl_list.append(my_url)
|
|
78
|
+
crawler = link_scanner(new_url, secure=secure, tor=tor, delay=delay)
|
|
79
|
+
crawler = list(set(crawler[:]))
|
|
80
|
+
for crawl in crawler:
|
|
81
|
+
print(CYAN + f"parsing: {crawl}")
|
|
82
|
+
if "=" in crawl:
|
|
83
|
+
crawl_list.append(crawl)
|
|
84
|
+
|
|
85
|
+
else:
|
|
86
|
+
time.sleep(delay)
|
|
87
|
+
try:
|
|
88
|
+
if tor:
|
|
89
|
+
my_request = web_session.get(crawl, verify=False, headers={"User-Agent": return_user_agent()}, proxies=tor_proxy, timeout=(60,120)).text
|
|
90
|
+
|
|
91
|
+
else:
|
|
92
|
+
my_request = web_session.get(crawl, verify=False, headers={"User-Agent": return_user_agent()}, timeout=(5,30)).text
|
|
93
|
+
|
|
94
|
+
forms = re.search("<form[\S\s\n]+form>", my_request)
|
|
95
|
+
form_type = re.findall("type=\"(\S+)\"|type=\'(\S+)\'", my_request)
|
|
96
|
+
|
|
97
|
+
if forms:
|
|
98
|
+
for form in form_type:
|
|
99
|
+
if form == "text" or form == "password" or form == "search":
|
|
100
|
+
crawl_list.append(crawl)
|
|
101
|
+
break
|
|
102
|
+
|
|
103
|
+
except:
|
|
104
|
+
continue
|
|
105
|
+
|
|
106
|
+
crawl_list = list(set(crawl_list))
|
|
107
|
+
|
|
108
|
+
# define payloads
|
|
109
|
+
init_mal_payloads = ["'", '"', "*", ";", "`", "')", '")', "*)", ";)", "`)", "'))", '"))', "*))", ";))", "`))", "')))", '")))', "*)))", ";)))", "`)))"]
|
|
110
|
+
|
|
111
|
+
# url payloads
|
|
112
|
+
url_mal_payloads = init_mal_payloads[:]
|
|
113
|
+
for mal in init_mal_payloads:
|
|
114
|
+
url_mal_payloads.append("& " + mal + " &")
|
|
115
|
+
url_mal_payloads.append("\\" + mal)
|
|
116
|
+
url_mal_payloads.append("./" + mal)
|
|
117
|
+
url_mal_payloads.append("#" + mal)
|
|
118
|
+
url_mal_payloads.append("\'\'\'" + mal + "\'\'\'")
|
|
119
|
+
|
|
120
|
+
new_mal_payloads = url_mal_payloads[:]
|
|
121
|
+
for mal in new_mal_payloads:
|
|
122
|
+
url_mal_payloads.append(mal.upper())
|
|
123
|
+
|
|
124
|
+
# other payloads
|
|
125
|
+
other_mal_payloads = init_mal_payloads[:]
|
|
126
|
+
for mal in init_mal_payloads:
|
|
127
|
+
other_mal_payloads.append("& " + mal + " &")
|
|
128
|
+
other_mal_payloads.append("\\" + mal)
|
|
129
|
+
other_mal_payloads.append("# " + mal)
|
|
130
|
+
other_mal_payloads.append("\'\'\'" + mal + "\'\'\'")
|
|
131
|
+
|
|
132
|
+
new_mal_payloads = other_mal_payloads[:]
|
|
133
|
+
for mal in new_mal_payloads:
|
|
134
|
+
other_mal_payloads.append(mal.upper())
|
|
135
|
+
|
|
136
|
+
# sql errors
|
|
137
|
+
mal_sql = ["SQL syntax.*?MySQL",
|
|
138
|
+
"Warning.*?\\Wmysqli?_",
|
|
139
|
+
"MySQLSyntaxErrorException",
|
|
140
|
+
"valid MySQL result",
|
|
141
|
+
"check the manual that (corresponds to|fits) your MySQL server version",
|
|
142
|
+
"check the manual that (corresponds to|fits) your MariaDB server version",
|
|
143
|
+
"check the manual that (corresponds to|fits) your Drizzle server version",
|
|
144
|
+
"Unknown column '[^ ]+' in 'field list'",
|
|
145
|
+
"MySqlClient\\.",
|
|
146
|
+
"com\\.mysql\\.jdbc",
|
|
147
|
+
"Zend_Db_(Adapter|Statement)_Mysqli_Exception",
|
|
148
|
+
"Pdo\\[./_\\]Mysql",
|
|
149
|
+
"MySqlException",
|
|
150
|
+
"SQLSTATE\\[\\d+\\]: Syntax error or access violation",
|
|
151
|
+
"MemSQL does not support this type of query",
|
|
152
|
+
"is not supported by MemSQL",
|
|
153
|
+
"unsupported nested scalar subselect",
|
|
154
|
+
"PostgreSQL.*?ERROR",
|
|
155
|
+
"Warning.*?\\Wpg_",
|
|
156
|
+
"valid PostgreSQL result",
|
|
157
|
+
"Npgsql\\.",
|
|
158
|
+
"PG::SyntaxError:",
|
|
159
|
+
"org\\.postgresql\\.util\\.PSQLException",
|
|
160
|
+
"ERROR:\\s\\ssyntax error at or near",
|
|
161
|
+
"ERROR: parser: parse error at or near",
|
|
162
|
+
"PostgreSQL query failed",
|
|
163
|
+
"org\\.postgresql\\.jdbc",
|
|
164
|
+
"Pdo\\[./_\\]Pgsql",
|
|
165
|
+
"PSQLException",
|
|
166
|
+
"OLE DB.*? SQL Server",
|
|
167
|
+
"\bSQL Server[^<"]+Driver",
|
|
168
|
+
"Warning.*?\\W(mssql|sqlsrv)_",
|
|
169
|
+
"\bSQL Server[^<"]+[0-9a-fA-F]{8}",
|
|
170
|
+
"System\\.Data\\.SqlClient\\.(SqlException|SqlConnection\\.OnError)",
|
|
171
|
+
"(?s)Exception.*?\bRoadhouse\\.Cms\\.",
|
|
172
|
+
"Microsoft SQL Native Client error '[0-9a-fA-F]{8}",
|
|
173
|
+
"\\[SQL Server\\]",
|
|
174
|
+
"ODBC SQL Server Driver",
|
|
175
|
+
"ODBC Driver \\d+ for SQL Server",
|
|
176
|
+
"SQLServer JDBC Driver",
|
|
177
|
+
"com\\.jnetdirect\\.jsql",
|
|
178
|
+
"macromedia\\.jdbc\\.sqlserver",
|
|
179
|
+
"Zend_Db_(Adapter|Statement)_Sqlsrv_Exception",
|
|
180
|
+
"com\\.microsoft\\.sqlserver\\.jdbc",
|
|
181
|
+
"Pdo\\[./_\\](Mssql|SqlSrv)",
|
|
182
|
+
"SQL(Srv|Server)Exception",
|
|
183
|
+
"Unclosed quotation mark after the character string",
|
|
184
|
+
"Microsoft Access (\\d+ )?Driver",
|
|
185
|
+
"JET Database Engine",
|
|
186
|
+
"Access Database Engine",
|
|
187
|
+
"ODBC Microsoft Access",
|
|
188
|
+
"Syntax error \\(missing operator\\) in query expression",
|
|
189
|
+
"\bORA-\\d{5}",
|
|
190
|
+
"Oracle error",
|
|
191
|
+
"Oracle.*?Driver",
|
|
192
|
+
"Warning.*?\\W(oci|ora)_",
|
|
193
|
+
"quoted string not properly terminated",
|
|
194
|
+
"SQL command not properly ended",
|
|
195
|
+
"macromedia\\.jdbc\\.oracle",
|
|
196
|
+
"oracle\\.jdbc",
|
|
197
|
+
"Zend_Db_(Adapter|Statement)_Oracle_Exception",
|
|
198
|
+
"Pdo\\[./_\\](Oracle|OCI)",
|
|
199
|
+
"OracleException",
|
|
200
|
+
"CLI Driver.*?DB2",
|
|
201
|
+
"DB2 SQL error",
|
|
202
|
+
"\bdb2_\\w+\\(",
|
|
203
|
+
"SQLCODE[=:\\d, -]+SQLSTATE",
|
|
204
|
+
"com\\.ibm\\.db2\\.jcc",
|
|
205
|
+
"Zend_Db_(Adapter|Statement)_Db2_Exception",
|
|
206
|
+
"Pdo\\[./_\\]Ibm",
|
|
207
|
+
"DB2Exception",
|
|
208
|
+
"ibm_db_dbi\\.ProgrammingError",
|
|
209
|
+
"Warning.*?\\Wifx_",
|
|
210
|
+
"Exception.*?Informix",
|
|
211
|
+
"Informix ODBC Driver",
|
|
212
|
+
"ODBC Informix driver",
|
|
213
|
+
"com\\.informix\\.jdbc",
|
|
214
|
+
"weblogic\\.jdbc\\.informix",
|
|
215
|
+
"Pdo\\[./_\\]Informix",
|
|
216
|
+
"IfxException",
|
|
217
|
+
"Dynamic SQL Error",
|
|
218
|
+
"Warning.*?\\Wibase_",
|
|
219
|
+
"org\\.firebirdsql\\.jdbc",
|
|
220
|
+
"Pdo\\[./_\\]Firebird",
|
|
221
|
+
"SQLite/JDBCDriver",
|
|
222
|
+
"SQLite\\.Exception",
|
|
223
|
+
"(Microsoft|System)\\.Data\\.SQLite\\.SQLiteException",
|
|
224
|
+
"Warning.*?\\W(sqlite_|SQLite3::)",
|
|
225
|
+
"\\[SQLITE_ERROR\\]",
|
|
226
|
+
"SQLite error \\d+:",
|
|
227
|
+
"sqlite3.OperationalError:",
|
|
228
|
+
"SQLite3::SQLException",
|
|
229
|
+
"org\\.sqlite\\.JDBC",
|
|
230
|
+
"Pdo\\[./_\\]Sqlite",
|
|
231
|
+
"SQLiteException",
|
|
232
|
+
"SQL error.*?POS([0-9]+)",
|
|
233
|
+
"Warning.*?\\Wmaxdb_",
|
|
234
|
+
"DriverSapDB",
|
|
235
|
+
"-3014.*?Invalid end of SQL statement",
|
|
236
|
+
"com\\.sap\\.dbtech\\.jdbc",
|
|
237
|
+
"\\[-3008\\].*?: Invalid keyword or missing delimiter",
|
|
238
|
+
"Warning.*?\\Wsybase_",
|
|
239
|
+
"Sybase message",
|
|
240
|
+
"Sybase.*?Server message",
|
|
241
|
+
"SybSQLException",
|
|
242
|
+
"Sybase\\.Data\\.AseClient",
|
|
243
|
+
"com\\.sybase\\.jdbc",
|
|
244
|
+
"Warning.*?\\Wingres_",
|
|
245
|
+
"Ingres SQLSTATE",
|
|
246
|
+
"Ingres\\W.*?Driver",
|
|
247
|
+
"com\\.ingres\\.gcf\\.jdbc",
|
|
248
|
+
"Exception (condition )?\\d+\\. Transaction rollback",
|
|
249
|
+
"com\\.frontbase\\.jdbc",
|
|
250
|
+
"Syntax error 1. Missing",
|
|
251
|
+
"(Semantic|Syntax) error [1-4]\\d{2}\\.",
|
|
252
|
+
"Unexpected end of command in statement \\[",
|
|
253
|
+
"Unexpected token.*?in statement \\[",
|
|
254
|
+
"org\\.hsqldb\\.jdbc",
|
|
255
|
+
"org\\.h2\\.jdbc",
|
|
256
|
+
"\\[42000-192\\]",
|
|
257
|
+
"![0-9]{5}![^\n]+(failed|unexpected|error|syntax|expected|violation|exception)",
|
|
258
|
+
"\\[MonetDB\\]\\[ODBC Driver",
|
|
259
|
+
"nl\\.cwi\\.monetdb\\.jdbc",
|
|
260
|
+
"Syntax error: EncounteCYAN",
|
|
261
|
+
"org\\.apache\\.derby",
|
|
262
|
+
"ERROR 42X01",
|
|
263
|
+
", Sqlstate: (3F|42).{3}, (Routine|Hint|Position):",
|
|
264
|
+
"/vertica/Parser/scan",
|
|
265
|
+
"com\\.vertica\\.jdbc",
|
|
266
|
+
"org\\.jkiss\\.dbeaver\\.ext\\.vertica",
|
|
267
|
+
"com\\.vertica\\.dsi\\.dataengine",
|
|
268
|
+
"com\\.mckoi\\.JDBCDriver",
|
|
269
|
+
"com\\.mckoi\\.database\\.jdbc",
|
|
270
|
+
"<REGEX_LITERAL>",
|
|
271
|
+
"com\\.facebook\\.presto\\.jdbc",
|
|
272
|
+
"io\\.prestosql\\.jdbc",
|
|
273
|
+
"com\\.simba\\.presto\\.jdbc",
|
|
274
|
+
"UNION query has different number of fields: \\d+, \\d+",
|
|
275
|
+
"Altibase\\.jdbc\\.driver",
|
|
276
|
+
"com\\.mimer\\.jdbc",
|
|
277
|
+
"Syntax error,[^\n]+assumed to mean",
|
|
278
|
+
"io\\.crate\\.client\\.jdbc",
|
|
279
|
+
"encounteCYAN after end of query",
|
|
280
|
+
"A comparison operator is requiCYAN here",
|
|
281
|
+
"-10048: Syntax error",
|
|
282
|
+
"rdmStmtPrepare\\(.+?\\) returned",
|
|
283
|
+
"SQ074: Line \\d+:",
|
|
284
|
+
"SR185: Undefined procedure",
|
|
285
|
+
"SQ200: No table ",
|
|
286
|
+
"Virtuoso S0002 Error",
|
|
287
|
+
"\\[(Virtuoso Driver|Virtuoso iODBC Driver)\\]\\[Virtuoso Server\\]"]
|
|
288
|
+
|
|
289
|
+
my_list = []
|
|
290
|
+
for crawl in crawl_list:
|
|
291
|
+
my_url = crawl
|
|
292
|
+
# check for xss in url
|
|
293
|
+
for mal in url_mal_payloads:
|
|
294
|
+
time.sleep(delay)
|
|
295
|
+
new_url = my_url + urllib.parse.quote(mal)
|
|
296
|
+
print(CYAN + f"checking: {new_url}")
|
|
297
|
+
try:
|
|
298
|
+
if tor:
|
|
299
|
+
my_request = web_session.get(new_url, verify=False, headers={"User-Agent": return_user_agent()}, proxies=tor_proxy, timeout=(60,120)).text
|
|
300
|
+
|
|
301
|
+
else:
|
|
302
|
+
my_request = web_session.get(new_url, verify=False, headers={"User-Agent": return_user_agent()}, timeout=(5,30)).text
|
|
303
|
+
|
|
304
|
+
alert = False
|
|
305
|
+
for sql in mal_sql:
|
|
306
|
+
check_sql = re.search(sql, my_request)
|
|
307
|
+
if check_sql:
|
|
308
|
+
print(RED + f"True: {new_url}")
|
|
309
|
+
my_list.append(new_url)
|
|
310
|
+
alert = True
|
|
311
|
+
break
|
|
312
|
+
|
|
313
|
+
if not alert:
|
|
314
|
+
print(GREEN + f"False: {new_url}")
|
|
315
|
+
|
|
316
|
+
except:
|
|
317
|
+
continue
|
|
318
|
+
|
|
319
|
+
# check for xss in headers
|
|
320
|
+
for mal in other_mal_payloads:
|
|
321
|
+
time.sleep(delay)
|
|
322
|
+
print(CYAN + f"checking headers: {my_url} {mal}:{mal}")
|
|
323
|
+
try:
|
|
324
|
+
if tor:
|
|
325
|
+
my_request = web_session.get(my_url, verify=False, headers={"User-Agent": return_user_agent(), mal:mal}, proxies=tor_proxy, timeout=(60,120)).text
|
|
326
|
+
|
|
327
|
+
else:
|
|
328
|
+
my_request = web_session.get(my_url, verify=False, headers={"User-Agent": return_user_agent(), mal:mal}, timeout=(5,30)).text
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
alert = False
|
|
332
|
+
for sql in mal_sql:
|
|
333
|
+
check_sql = re.search(sql, my_request)
|
|
334
|
+
if check_sql:
|
|
335
|
+
print(RED + f"True headers: {my_url} {mal}:{mal}")
|
|
336
|
+
my_list.append(f"headers: {my_url} {mal}:{mal}")
|
|
337
|
+
alert = True
|
|
338
|
+
break
|
|
339
|
+
|
|
340
|
+
if not alert:
|
|
341
|
+
print(GREEN + f"False headers: {my_url} {mal}:{mal}")
|
|
342
|
+
|
|
343
|
+
except:
|
|
344
|
+
continue
|
|
345
|
+
|
|
346
|
+
# check for xss in cookies
|
|
347
|
+
for mal in other_mal_payloads:
|
|
348
|
+
time.sleep(delay)
|
|
349
|
+
print(CYAN + f"checking cookie: {my_url} {mal}:{mal}")
|
|
350
|
+
try:
|
|
351
|
+
if tor:
|
|
352
|
+
my_request = web_session.get(my_url, verify=False, cookies={mal:mal}, headers={"User-Agent": return_user_agent()}, proxies=tor_proxy, timeout=(60,120)).text
|
|
353
|
+
|
|
354
|
+
else:
|
|
355
|
+
my_request = web_session.get(my_url, verify=False, cookies={mal:mal}, headers={"User-Agent": return_user_agent()}, timeout=(5,30)).text
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
alert = False
|
|
359
|
+
for sql in mal_sql:
|
|
360
|
+
check_sql = re.search(sql, my_request)
|
|
361
|
+
if check_sql:
|
|
362
|
+
print(RED + f"True cookies: {my_url} {mal}:{mal}")
|
|
363
|
+
my_list.append(f"cookies: {my_url} {mal}:{mal}")
|
|
364
|
+
alert = True
|
|
365
|
+
break
|
|
366
|
+
|
|
367
|
+
if not alert:
|
|
368
|
+
print(GREEN + f"False cookies: {my_url} {mal}:{mal}")
|
|
369
|
+
|
|
370
|
+
except:
|
|
371
|
+
continue
|
|
372
|
+
|
|
373
|
+
# check for xss in forms
|
|
374
|
+
time.sleep(delay)
|
|
375
|
+
forms = form_scanner(url, secure=secure, tor=tor)
|
|
376
|
+
for mal in other_mal_payloads:
|
|
377
|
+
time.sleep(delay)
|
|
378
|
+
for form in forms:
|
|
379
|
+
action = re.findall("action=[\"\'](\S+)[\"\']", form)
|
|
380
|
+
action = action[0].lower()
|
|
381
|
+
form_input = re.findall("<input.+>", form)
|
|
382
|
+
method = re.findall("method=[\"\'](\S+)[\"\']", form)
|
|
383
|
+
method = method[0].lower()
|
|
384
|
+
name = re.findall("name=[\"\'](\S+)[\"\']", form)
|
|
385
|
+
|
|
386
|
+
if url in action:
|
|
387
|
+
new_url = my_url
|
|
388
|
+
|
|
389
|
+
else:
|
|
390
|
+
if action.startswith("/"):
|
|
391
|
+
new_url = my_url + action[1:]
|
|
392
|
+
|
|
393
|
+
else:
|
|
394
|
+
new_url = my_url + action
|
|
395
|
+
|
|
396
|
+
for my_input in form_input:
|
|
397
|
+
form_type = re.findall("type=\"(\S+)\"", my_input)
|
|
398
|
+
for my_type in form_type:
|
|
399
|
+
if my_type == "text" or my_type == "password" or my_type == "search":
|
|
400
|
+
name = re.findall("name=\"(\S+)\"", form)
|
|
401
|
+
name = name[0]
|
|
402
|
+
print(CYAN + f"checking: forms: {new_url} {name}:{mal}")
|
|
403
|
+
try:
|
|
404
|
+
if method == "get":
|
|
405
|
+
if tor:
|
|
406
|
+
my_request = web_session.get(new_url, params={name:mal}, verify=False, headers={"User-Agent": return_user_agent()}, proxies=tor_proxy, timeout=(60,120)).text
|
|
407
|
+
|
|
408
|
+
else:
|
|
409
|
+
my_request = web_session.get(new_url, params={name:mal}, verify=False, headers={"User-Agent": return_user_agent()}, timeout=(5,30)).text
|
|
410
|
+
|
|
411
|
+
if method == "post":
|
|
412
|
+
if tor:
|
|
413
|
+
my_request = web_session.post(new_url, data={name:mal}, verify=False, headers={"User-Agent": return_user_agent()}, proxies=tor_proxy, timeout=(60,120)).text
|
|
414
|
+
|
|
415
|
+
else:
|
|
416
|
+
my_request = web_session.post(new_url, data={name:mal}, verify=False, headers={"User-Agent": return_user_agent()}, timeout=(5,30)).text
|
|
417
|
+
|
|
418
|
+
except:
|
|
419
|
+
continue
|
|
420
|
+
|
|
421
|
+
try:
|
|
422
|
+
alert = False
|
|
423
|
+
for sql in mal_sql:
|
|
424
|
+
check_sql = re.search(sql, my_request)
|
|
425
|
+
if check_sql:
|
|
426
|
+
print(RED + f"True forms: {new_url} {name}:{mal}")
|
|
427
|
+
my_list.append(f"forms: {new_url} {name}:{mal}")
|
|
428
|
+
alert = True
|
|
429
|
+
break
|
|
430
|
+
|
|
431
|
+
if not alert:
|
|
432
|
+
print(GREEN + f"False forms: {new_url} {name}:{mal}")
|
|
433
|
+
|
|
434
|
+
except:
|
|
435
|
+
continue
|
|
436
|
+
|
|
437
|
+
print(CYAN + "")
|
|
438
|
+
clear()
|
|
439
|
+
|
|
440
|
+
my_list.sort()
|
|
441
|
+
|
|
442
|
+
return my_list
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from TheSilent.clear import clear
|
|
2
|
+
from TheSilent.sql_injection_scanner import sql_injection_scanner
|
|
3
|
+
from TheSilent.xss_scanner import xss_scanner
|
|
4
|
+
|
|
5
|
+
CYAN = "\033[1;36m"
|
|
6
|
+
|
|
7
|
+
# scans for security flaws and bad practices
|
|
8
|
+
def web_scanner(url, secure=True, tor=False, delay=1, report=True):
|
|
9
|
+
clear()
|
|
10
|
+
|
|
11
|
+
my_sql_injection_scanner = sql_injection_scanner(url=url, secure=secure, tor=tor, delay=delay)
|
|
12
|
+
my_xss_scanner = xss_scanner(url=url, secure=secure, tor=tor, delay=delay)
|
|
13
|
+
|
|
14
|
+
clear()
|
|
15
|
+
|
|
16
|
+
print(CYAN + "sql injection:")
|
|
17
|
+
|
|
18
|
+
for i in my_sql_injection_scanner:
|
|
19
|
+
if report:
|
|
20
|
+
with open(url + ".txt", "a") as f:
|
|
21
|
+
f.write(i + "\n")
|
|
22
|
+
|
|
23
|
+
print(CYAN + i)
|
|
24
|
+
|
|
25
|
+
print(CYAN + "")
|
|
26
|
+
print(CYAN + "xss:")
|
|
27
|
+
|
|
28
|
+
for i in my_xss_scanner:
|
|
29
|
+
if report:
|
|
30
|
+
with open(url + ".txt", "a") as f:
|
|
31
|
+
f.write(i + "\n")
|
|
32
|
+
|
|
33
|
+
print(CYAN + i)
|