Location: PHPKode > projects > Php Admin Tools > EasyPHP/www/PAT_0.0.9b/extra/PAT/apps/caffeine_monkey/scan.php
<?php

/* Copyright 2002-2003 Phillip Stansell & Damien Heiser
 *
 * This file is part of Caffeine Monkey.
 *
 * Caffeine Monkey is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Caffeine Monkey is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Caffeine Monkey; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

require_once './cm.php';

$scan_form = $settings['SCAN_FORM'];

$form_host = $_GET[scan_host];
$form_ftp = $_GET[scan_ftp];
$form_telnet = $_GET[scan_telnet];
$form_dns = $_GET[scan_dns];
$form_http = $_GET[scan_http];
$form_pop3 = $_GET[scan_pop3];
$form_portnumber = $_GET[scan_portnumber];
$form_range1 = $_GET[scan_range1];
$form_range2 = $_GET[scan_range2];

$dorange = $scan_form['dorange'];
$range = $scan_form['range'];

echo html_header( array( 'page_name' => 'Port Scan', 'host_name' => $form_host ) );

if ( isset($_GET[scan_host]) ) {
 echo date("r")."\n\n";

 // Standard Portsan
 echo scan($form_host, $form_ftp, $form_telnet, $form_dns, $form_http, $form_pop3, $form_portnumber);

 // Range Portscan
 if ( ($_GET[scan_range1] != NULL ) && ($_GET[scan_range2] != NULL) && ($dorange = 1)) {
  if ( $form_range1 < $form_range2 ) {
   $check_range = $form_range2 - $form_range1;
   if ($check_range < $range) {
    echo "\n";
    echo rangescan($form_host, $form_range1, $form_range2);
   } else {echo "\nPort numbers are outside of range ($range)";}
  }
 } 
}

echo html_footer();
                           
?>

Return current item: Php Admin Tools