PDA

Просмотр полной версии : Нужен скрипт!


fly
19.10.2007, 01:48
Если кто может, нужен скрипт на php с интерфейсом!
Идея такая.
У меня есть большое кол-во web шеллов , надо реализовать обычный чекер ,т.е. он просто будет показывать есть ли на месте мой шелл
+ меню добавления и удаления.

Т.е. примерно так

[host] Status
http://ssss.ru/mmmm/shell.php Yes

И если нет

[host] Status
http://ssss.ru/mmmm/shell.php No

Заплачу 5wmz!


Функция чека
function getstaturl($url)
{
$url = parse_url($url);
if (!isset($url['host'])) return false;
$url['path'] = isset($url['path']) ? $url['path'] : "/";

$fp = fsockopen($url['host'], 80, $errno, $errstr, 5);
if (!$fp) return false;

$out = "HEAD {$url['path']} HTTP/1.1\r\n";
$out .= "Host: {$url['host']}\r\n";
$out .= "Connection: Close\r\n\r\n";

fwrite($fp, $out);

for ($headers = ''; !feof($fp); )
{
$str = fgets($fp, 4096) . "\r\n";
if (preg_match("/^HTTP\\/\\d+\\.\\d+\\s+200\\s+OK\\s*$/iX", $str))
{
fclose($fp);
return "<div class\"style1\">Yes</div>";
}
}

fclose($fp);
return "<font c

inv
19.10.2007, 02:03
в асю стукни или напиши свою

demonoid
19.10.2007, 03:29
Зачем так мучаться на php?

#!/usr/bin/perl -w
use LWP::UserAgent;
use strict;
use warnings;

my ( $ua,$response) = ( LWP::UserAgent->new,undef );
my $shell_file = 'web-shell.txt';

open ( my $WS, '<', $shell_file) or exit print '[!] Can\'t open web-shell file : $shell_file \n';

while( <$WS> )
{
chomp;
$response = $ua->get( $_ );
printf "[STATUS] : %s [URL] : %s \n",$response->status_line=~/(\d+)/,$_;
}

close( $WS );

файл:web-shell.txt

http://old.antichat.ru/txt/old/anonumus.shtml
http://zbrute.antichat.ru/about.html
http://old.antichat.ru/shell.php
C:\>perl -w s.pl
[STATUS] : 200 [URL] : http://old.antichat.ru/txt/old/anonumus.shtml
[STATUS] : 200 [URL] : http://zbrute.antichat.ru/about.html
[STATUS] : 500 [URL] : http://old.antichat.ru/shell.php