Changeset 385


Ignore:
Timestamp:
04/09/2010 07:35:53 PM (3 years ago)
Author:
sullo
Message:

Ticket 143: Added -ask to override nikto.conf UPDATES value

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/CHANGES.txt

    r373 r385  
     12010-04-09 
     2        - Ticket 143: Added -ask to override nikto.conf's UPDATES value (same options) 
    132010-04-01 
    24        - Ticket 134: Added documentation of -config to usage_short 
  • trunk/plugins/nikto_core.plugin

    r384 r385  
    524524               "Version"          => \$CLI{'version'}, 
    525525               "Plugins=s"        => \$CLI{'plugins'}, 
    526                "list-plugins"     => \$CLI{'list-plugins'} 
     526               "list-plugins"     => \$CLI{'list-plugins'}, 
     527               "ask=s"            => \$CLI{'ask'} 
    527528               ) or usage(0); 
    528529 
     
    534535    # output file 
    535536    if (!defined $CLI{'format'}) { 
     537 
    536538        # Check what output has 
    537539        $CLI{'format'} = "none"; 
     
    556558 
    557559    # verify readable dtd 
    558     if ($CLI{'format'} eq 'xml' && !-r $NIKTOCONFIG{NIKTODTD}) { 
     560    if ($CLI{'format'} eq 'xml' && !-r $NIKTOCONFIG{'NIKTODTD'}) { 
    559561        nprint("+ ERROR: reading DTD"); 
    560562        exit; 
     
    625627            $CLI{'plugins'} .= ';dictionary(dictionary:' . $CLI{'mutate-opts'} . ')'; 
    626628        } 
     629    } 
     630 
     631    # Asking questions? 
     632    if ($CLI{'ask'} =~ /^(auto|yes|no)$/) { 
     633        $NIKTOCONFIG{'UPDATES'} = $CLI{'ask'};    # override nikto.conf setting 
     634        undef($CLI{'ask'}); 
    627635    } 
    628636 
     
    12051213    if ($CLI{'nossl'}) { pop(@checktypes); } 
    12061214 
    1207     foreach my $method (split(/ /, $NIKTOCONFIG{CHECKMETHODS})) { 
     1215    foreach my $method (split(/ /, $NIKTOCONFIG{'CHECKMETHODS'})) { 
    12081216        $request{'whisker'}->{'method'} = $method; 
    12091217        foreach my $checkssl (@checktypes) { 
     
    22862294####################################################################### 
    22872295sub send_updates { 
    2288     return if ($NIKTOCONFIG{UPDATES} !~ /yes|auto/i); 
     2296    return if ($NIKTOCONFIG{'UPDATES'} !~ /yes|auto/i); 
    22892297 
    22902298    my $have_updates = 0; 
     
    23242332    $updated_version =~ s/^\s+//; 
    23252333 
    2326     if ($NIKTOCONFIG{UPDATES} eq "auto") { 
     2334    if ($NIKTOCONFIG{'UPDATES'} eq "auto") { 
    23272335        $answer = "y"; 
    23282336    } 
     
    23852393        print " 
    23862394   Options: 
     2395       -ask+               Whether to ask about submitting updates 
     2396                               yes   Ask about each (default) 
     2397                               no    Don't ask, don't send 
     2398                               auto  Don't ask, just send 
    23872399       -config+            Use this config file 
    23882400       -Cgidirs+           Scan these CGI dirs: 'none', 'all', or values like \"/cgi/ /cgi-a/\" 
     
    24042416        print "       -findonly          Find http(s) ports only, don't perform a full scan 
    24052417       -Format+           Save file (-o) format: 
    2406                                 csv   Comma-separated-value 
    2407                                 htm   HTML Format 
    2408                                 nbe   Nessus NBE format 
    2409                                 txt   Plain text (default if not specified) 
    2410                                 xml   XML Format 
     2418                               csv   Comma-separated-value 
     2419                               htm   HTML Format 
     2420                               nbe   Nessus NBE format 
     2421                               txt   Plain text (default if not specified) 
     2422                               xml   XML Format 
    24112423       -host+             Target host 
    24122424       -Help              Extended help information 
Note: See TracChangeset for help on using the changeset viewer.