Changeset 75


Ignore:
Timestamp:
09/16/2008 08:52:10 AM (5 years ago)
Author:
deity
Message:

Fix for ticket #37

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/CHANGES.txt

    r73 r75  
     12008-09-16 plugins/nikto_core.plugin plugins/nikto_httpoptions.plugin 
     2        - Fix for ticket #37 
     3        - Allow fetch to optionally call LW2::http_fixup_request 
     4        - Better handling of extra headers within fetch 
    152008-09-14 plugins/db_server_msgs plugins/nikto_*.plugin 
    26        - Update server messages to dynamic database format 
  • trunk/nikto.pl

    r74 r75  
    163163} 
    164164 
    165 nprint("+ %COUNTERS{host_total} host(s) tested"); 
     165nprint("+ $COUNTERS{hosts_total} host(s) tested"); 
    166166send_updates(); 
    167167close_output(); 
  • trunk/plugins/nikto_core.plugin

    r73 r75  
    18781878 delete $request{'Content-Encoding'}; 
    18791879 delete $request{'Content-Length'}; 
     1880 my $header_hash=$_[3]; 
    18801881 
    18811882 if ($_[2] ne "") 
     
    18891890 if (defined $_[3]) 
    18901891 { 
    1891     # define temporary hash due to more perl stupidity 
    1892     my $header_hash=$_[3]; 
    18931892    # loop through the hash ref passed and add each header to request 
    18941893    while (my($key, $value) = each(%$header_hash)) 
    18951894    { 
    1896        $request{'whisker'}->{$key}=$value; 
     1895       $request{$key}=$value; 
    18971896    } 
    18981897 }  
    18991898 $NIKTO{totalrequests}++; 
    1900  LW2::http_fixup_request(\%request); 
     1899 unless ($_[4]) { LW2::http_fixup_request(\%request); } 
    19011900 LW2::http_do_request_timeout(\%request,\%result); 
    19021901 dump_var("Request Hash", \%request); 
     
    19111910  } 
    19121911 
     1912 # Clean up extra headers 
     1913 if (defined $_[3]) 
     1914 { 
     1915    while (my($key, $value) = each(%$header_hash)) 
     1916    { 
     1917       delete $request{$key}; 
     1918    } 
     1919 } 
    19131920 return $result{'whisker'}->{'code'}, $result{'whisker'}->{'data'}; 
    19141921} 
  • trunk/plugins/nikto_httpoptions.plugin

    r73 r75  
    6262      foreach my $m (split /,? /, $public_methods) { eval_methods($m, "Public", $dbarray); } 
    6363   } 
     64 
     65   # Check for other weirdness 
     66   # IIS PROPFIND HEADER 
     67   my %headers=( 
     68      "Host" => "", 
     69      "Content-Length" => "0", 
     70   ); 
     71   ($RES, $CONTENT) = fetch("/","PROPFIND","",\%headers,1); 
     72   if ($RES == 207) 
     73   { 
     74      if ($CONTENT =~ "<a:href>http://") 
     75      { 
     76         my $ipfound=$CONTENT; 
     77         $ipfound =~ s/^.*<a:href>//g; 
     78         $ipfound =~ s/<\/a:href>.*$//g; 
     79         add_vulnerability($CURRENT_HOST_ID,"PROPFIND may show the server's internal IP address: $ipfound",999973,13431); 
     80      } 
     81   }  
    6482  
    6583   # Now release memory for the dbarray 
Note: See TracChangeset for help on using the changeset viewer.