-
Notifications
You must be signed in to change notification settings - Fork 0
/
checker.py
29 lines (26 loc) · 856 Bytes
/
checker.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
import requests
import base64
import string
import random
ips = ["0.0.0.0:9000"]
for ip in ips:
work = False
name = ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(16))
password = ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(16))
requests.get("http://"+ip+"/reg_me_pls?nick="+name+"&password="+password)
x = requests.get("http://"+ip+"/passwords")
lines = x.text.split("\n")
lines.pop()
new_pasword = ""
for line in lines:
new_name, b64password = line.split(" ")
if (new_name != name): continue
xor = base64.b64decode(b64password).decode('utf-8')
for i in range(len(xor)):
new_pasword += chr(ord(xor[i]) ^ ord(name[i%len(name)]))
if (new_pasword == password):
work = True
if (work):
print(ip, "work")
else:
print(ip, "not work")