Нужен скрипт!

Discussion in 'PHP' started by fly, 19 Oct 2007.

  1. fly

    fly Member

    Joined:
    15 Apr 2007
    Messages:
    584
    Likes Received:
    95
    Reputations:
    -10
    Если кто может, нужен скрипт на php с интерфейсом!
    Идея такая.
    У меня есть большое кол-во web шеллов , надо реализовать обычный чекер ,т.е. он просто будет показывать есть ли на месте мой шелл
    + меню добавления и удаления.

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

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

    И если нет

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

    Заплачу 5wmz!


    Функция чека
    Code:
      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
     
    #1 fly, 19 Oct 2007
    Last edited: 19 Oct 2007
  2. inv

    inv Banned

    Joined:
    3 Aug 2007
    Messages:
    261
    Likes Received:
    143
    Reputations:
    -58
    в асю стукни или напиши свою
     
    2 people like this.
  3. demonoid

    demonoid Banned

    Joined:
    12 Jan 2007
    Messages:
    101
    Likes Received:
    111
    Reputations:
    27
    Зачем так мучаться на php?

    Code:
    #!/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

    Code:
    http://old.antichat.ru/txt/old/anonumus.shtml
    http://zbrute.antichat.ru/about.html
    http://old.antichat.ru/shell.php
    Code:
    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