Changeset 621


Ignore:
Timestamp:
02/11/2011 04:20:19 PM (2 years ago)
Author:
sullo
Message:

Fix nmap file identification, match /ssl/ as well as /http/ for web server ports.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/CHANGES.txt

    r620 r621  
    2323        - Ticket 155: -findonly is deprecated in favor of -Plugins "@@NONE" (-f will replicate this functionality) 
    2424        - Ticket 82: Auth is now checked per realm, not per resource 
    25         - Fix parsing of nmap greppable output so that any port descr matching http is checked. Thanks Moses Hernandez for reporting. 
     25        - Fix parsing of nmap greppable output so that any port descr matching http is checked. Thanks Moses Hernandez & @mubix for 
     26                reporting & testing. 
    2627        - Fix a potential div by zero error 
    2728        - Various cleanups in nikto_report_xml.plugin and nikto_report_html.plugin 
  • trunk/plugins/nikto_core.plugin

    r620 r621  
    10111011sub parse_hostfile { 
    10121012    my ($file) = @_; 
    1013     my (@results, $hostdesc, $nmap); 
    1014     $nmap = 0; 
     1013    my (@results, $hostdesc); 
     1014    my $nmap = 0; 
    10151015 
    10161016    open(IN, $file) || die print STDERR "+ ERROR: Cannot open '$file':$@\n"; 
     
    10201020        # Check whether this is a greppable nmap file 
    10211021        chomp; 
    1022         if (/^# Nmap [0-9.]* scan initiated/) { 
    1023             $nmap = 1; 
    1024         } 
     1022        $nmap = 1 if (/^# Nmap/); 
    10251023        s/\#.*$//; 
    10261024        if ($_ eq "") { next; } 
     
    10281026        # Parse for nmap files 
    10291027        if ($nmap) { 
    1030             if (($_ !~ /Host/) || ($_ !~ /Ports/) || ($_ !~ /open/) || ($_ !~ /http/i)) { next; } 
     1028            if (($_ !~ /Host/) || ($_ !~ /Ports/) || ($_ !~ /open/) || ($_ !~ /(?:http|ssl)/i)) { next; } 
    10311029 
    10321030            # Get the host name 
Note: See TracChangeset for help on using the changeset viewer.