Changeset 155
- Timestamp:
- 08/13/2009 09:43:24 PM (4 years ago)
- File:
-
- 1 edited
-
trunk/plugins/nikto_httpoptions.plugin (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/nikto_httpoptions.plugin
r152 r155 43 43 { 44 44 my ($mark) = @_; 45 my %headers; 45 46 # test for both OPTIONS / and OPTIONS * as they may give different results 46 (my $ RES, $CONTENT) = fetch("*", "OPTIONS");47 my $aoptions = "$ result{allow}, ";48 my $poptions = "$ result{public}, ";47 (my $res, $content) = nfetch($mark,"*", "OPTIONS", "", \%headers); 48 my $aoptions = "$headers{allow}, "; 49 my $poptions = "$headers{public}, "; 49 50 my ($allow_methods, $public_methods, $txt); 50 51 my $dbarray; … … 52 53 $dbarray=initialise_db("db_httpoptions"); 53 54 54 ($ RES, $CONTENT) = fetch("/", "OPTIONS");55 $aoptions .= $ result{allow};56 $poptions .= $ result{public};55 ($res, $content) = nfetch($mark,"/", "OPTIONS", "", \%headers); 56 $aoptions .= $headers{allow}; 57 $poptions .= $headers{public}; 57 58 58 59 foreach my $o (split(/,[ ]?/, $aoptions)) { $allow_methods .= ", $o" unless ($allow_methods =~ /\b$o\b/ || $o eq ''); } … … 79 80 # IIS Debug 80 81 81 ($ RES, $CONTENT) = nfetch($mark,"/","DEBUG",);82 if ($ RES== 200)82 ($res, $content) = nfetch($mark,"/","DEBUG",); 83 if ($res == 200) 83 84 { 84 85 add_vulnerability($mark,"DEBUG HTTP verb may show server debugging information",999972,0,"DEBUG"); … … 89 90 "Content-Length" => "0", 90 91 ); 91 ($ RES, $CONTENT) = nfetch($mark,"/","PROPFIND","",\%headers,1);92 if ($ RES== 207)92 ($res, $content) = nfetch($mark,"/","PROPFIND","",\%headers,1); 93 if ($res == 207) 93 94 { 94 if ($ CONTENT=~ "<a:href>http://")95 if ($content =~ "<a:href>http://") 95 96 { 96 my $ipfound=$ CONTENT;97 my $ipfound=$content; 97 98 $ipfound =~ s/^.*<a:href>//g; 98 99 $ipfound =~ s/<\/a:href>.*$//g; … … 111 112 { 112 113 $request{whisker}{version} = $version; 113 ($ RES, $CONTENT) = nfetch($mark,"/","$method","",\%headers);114 if ($ RES== 200)114 ($res, $content) = nfetch($mark,"/","$method","",\%headers); 115 if ($res == 200) 115 116 { 116 if ($ CONTENT=~ "Nikto")117 if ($content =~ "Nikto") 117 118 { 118 119 add_vulnerability($mark,"HTTP $method method is active, suggesting the host is vulnerable to XST",999971,877);
Note: See TracChangeset
for help on using the changeset viewer.