Changeset 395


Ignore:
Timestamp:
04/18/2010 06:07:12 PM (3 years ago)
Author:
deity
Message:

remove content_search from nikto_core (now done in a plugin) and clean up on date_disp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/nikto_core.plugin

    r393 r395  
    158158sub date_disp { 
    159159    my @time = localtime($_[0]); 
    160     $time[5] += 1900; 
    161     $time[4]++; 
    162     if (length($time[4]) eq 1) { $time[4] = "0$time[4]"; } 
    163     $time[3]++; 
    164     if (length($time[3]) eq 1) { $time[3] = "0$time[3]"; } 
    165     if (length($time[0]) eq 1) { $time[0] = "0$time[0]"; } 
    166     if (length($time[1]) eq 1) { $time[1] = "0$time[1]"; } 
    167     if (length($time[2]) eq 1) { $time[0] = "0$time[2]"; } 
    168     return "$time[5]-$time[4]-$time[3] $time[2]:$time[1]:$time[0]"; 
     160    my $result = sprintf("%d-%02d-%02d %02d:%02d:%02d", $time[5] + 1900, 
     161                            $time[4]+1, $time[3]+1, $time[2], $time[1], 
     162                            $time[0]); 
     163    return $result; 
    169164} 
    170165 
     
    11041099    nprint "\n"; 
    11051100    exit; 
    1106 } 
    1107  
    1108 ############################################################################### 
    1109 sub content_search { 
    1110     my $body   = shift; 
    1111     my $file   = shift; 
    1112     my $method = shift || "GET"; 
    1113     my ($mark) = @_; 
    1114  
    1115     foreach my $testid (keys %CONTENTSEARCH) { 
    1116         if ($body =~ /$CONTENTSEARCH{$testid}{string}/) { 
    1117             my $outmessage = "$file: $CONTENTSEARCH{$testid}{'message'}"; 
    1118             add_vulnerability($mark, $outmessage, 
    1119                               $CONTENTSEARCH{$testid}{testid}, 
    1120                               $CONTENTSEARCH{$testid}{osvdb}, 
    1121                               $method, $file); 
    1122         } 
    1123     } 
    1124  
    1125     return; 
    11261101} 
    11271102 
Note: See TracChangeset for help on using the changeset viewer.