Changeset 459


Ignore:
Timestamp:
06/19/2010 04:24:45 AM (3 years ago)
Author:
sullo
Message:

Bug fix & minor tweaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/nikto_core.plugin

    r458 r459  
    125125 
    126126    # print errors to STDERR 
    127     if ($line =~ /^\+ ERROR\:/) { print STDERR "$line\n"; return; } 
     127    if ($line =~ /^\+ ERROR:/) { print STDERR "$line\n"; return; } 
    128128 
    129129    # don't print to STDOUT if output file is "-" 
    130130    if ((defined $CLI{'file'}) && ($CLI{'file'} eq "-")) { return; } 
    131131 
    132 # print to scan details to standard output if the users wants another format and is saving results to a file 
    133132    $line =~ s/(CVE\-[12][0-9]{4}-[0-9]{4})/http:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name\=$1/g; 
    134133    $line =~ s/(CA\-[12][0-9]{3}-[0-9]{2})/http:\/\/www.cert.org\/advisories\/$1.html/g; 
     
    136135    $line =~ 
    137136      s/(MS[0-9]{2}\-[0-9]{3})/http:\/\/www.microsoft.com\/technet\/security\/bulletin\/$1.asp/gi; 
    138     print "$line\n"; 
     137 
     138    print $line ."\n"; 
    139139 
    140140    return; 
     
    195195            ($res, $content, $error) = nfetch($mark, "/", "GET", "", \%headers, "", "map_codes"); 
    196196        } 
    197         else                                                    # different host... ugh... guess 
     197        else                                                    # different host... ugh... just guess 
    198198        { 
    199199            $FoF{'okay'}{'response'} = 200; 
     
    225225 
    226226    # add those generic type holders back as real files 
    227     $REQS{'/$rs/'} = "DIRECTORY"; 
    228     $REQS{'/$rs'}  = "NONE"; 
    229     $REQS{'/.$rs'} = "DOTFILE"; 
     227    $REQS{"/$rs/"} = "DIRECTORY"; 
     228    $REQS{"/$rs"}  = "NONE"; 
     229    $REQS{"/.$rs"} = "DOTFILE"; 
    230230 
    231231    foreach my $file (keys %REQS) { 
     
    913913sub parse_hostfile { 
    914914    my ($file) = @_; 
    915     my $nmap = 0; 
    916     my (@results, $hostdesc); 
     915    my (@results, $hostdesc, $nmap); 
     916    $nmap = 0; 
    917917 
    918918    open(IN, $file) || die print STDERR "+ ERROR: Cannot open '$file':$@\n"; 
     
    929929 
    930930        # Parse for nmap files 
    931         if ($nmap == 1) { 
     931        if ($nmap) { 
    932932 
    933933            # First get the host name 
     
    960960sub load_databases { 
    961961    my @dbs = qw/db_404_strings  db_outdated  db_realms  db_tests  db_variables db_content_search/; 
    962     my $prefix = $_[0]; 
    963  
    964     unless (defined $prefix) { 
    965         $prefix = ""; 
    966     } 
     962    my $prefix = $_[0] || ""; 
    967963 
    968964    # verify required files 
Note: See TracChangeset for help on using the changeset viewer.