Changeset 176


Ignore:
Timestamp:
10/16/2009 09:11:49 PM (4 years ago)
Author:
jabra
Message:

patch from chris sullow with improvements to allow for -output "-" to output to STDOUT without txt output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/nikto_core.plugin

    r165 r176  
    2222# Nikto core functionality 
    2323############################################################################### 
    24  
    2524sub change_variables 
    2625{ 
     
    9695   # print errors to STDERR 
    9796   if ($line =~ /ERROR\:/) { print STDERR "$line\n"; return; } 
     97    
     98   # don't print to STDOUT if output file is "-" 
     99   if ($CLI{format} =~ /^xml$/i and $CLI{file} eq "-") { return; } 
     100  
     101   # don't print to STDOUT if output file is "-" 
     102   if ($CLI{format} =~ /^html?$/i and $CLI{file} eq "-") { return; } 
     103    
    98104 
    99105   # print to scan details to standard output if the users wants another format and is saving results to a file 
Note: See TracChangeset for help on using the changeset viewer.