Changeset 505
- Timestamp:
- 08/11/2010 11:43:01 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
nikto.pl (modified) (1 diff)
-
plugins/nikto_auth.plugin (modified) (2 diffs)
-
plugins/nikto_core.plugin (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/nikto.pl
r504 r505 44 44 # global var/definitions 45 45 use vars qw/$TEMPLATES %ERRSTRINGS %CLI %VARIABLES %TESTS $CONTENT/; 46 use vars qw/%NIKTO % REALMS %NIKTOCONFIG %request %result %COUNTERS/;46 use vars qw/%NIKTO %NIKTOCONFIG %request %result %COUNTERS/; 47 47 use vars qw/%db_extensions %FoF %UPDATES @DBFILE @BUILDITEMS/; 48 48 use vars qw/@RESULTS @PLUGINS @MARKS @REPORTS %CACHE %CONTENTSEARCH/; -
trunk/plugins/nikto_auth.plugin
r483 r505 55 55 $REALMS = init_db("db_realms"); 56 56 %REALMSMATCHED = (); 57 58 if (defined $CLI{'hostauth'}) { 59 my @x = split(/:/, $CLI{'hostauth'}); 60 61 my $HOSTAUTH = { 62 nikto_id => "700500", 63 realm => (defined $x[2]) ? $x[2] : '@ANY', 64 password => $x[1], 65 id => $x[0], 66 message => "Credentials provided by CLI.", 67 }; 68 unshift(@{$REALMS}, $HOSTAUTH); 69 } 57 70 } 58 71 … … 152 165 if ($result->{'www-authenticate'} eq '' 153 166 && !defined $result->{'whisker'}->{'error'}) { 154 155 167 my $message = 156 168 "Default account found for '$realm' at $uridir ($request->{'whisker'}->{'uri'}) (ID '$entry->{'id'}', PW '$entry->{'password'}'). $entry->{message}"; -
trunk/plugins/nikto_core.plugin
r504 r505 983 983 ############################################################################### 984 984 sub load_databases { 985 my @dbs = qw/db_404_strings db_outdated db_ realms db_tests db_variables db_content_search/;985 my @dbs = qw/db_404_strings db_outdated db_tests db_variables db_content_search/; 986 986 my $prefix = $_[0] || ""; 987 987 … … 1047 1047 $OVERS{ $T[1] }{ $T[2] } = $T[3]; 1048 1048 $OVERS{ $T[1] }{'tid'} = $T[0]; 1049 }1050 }1051 1052 # db_realms1053 elsif ($file eq 'db_realms') {1054 my $db_realms_ctr = keys %REALMS;1055 foreach my $l (@file) {1056 my @t = parse_csv($l);1057 $REALMS{$db_realms_ctr}{'tid'} = $t[0];1058 $REALMS{$db_realms_ctr}{'realm'} = $t[1];1059 $REALMS{$db_realms_ctr}{'id'} = $t[2];1060 $REALMS{$db_realms_ctr}{'pw'} = $t[3];1061 $REALMS{$db_realms_ctr}{'msg'} = $t[4];1062 $db_realms_ctr++;1063 }1064 1065 # Cheat and add CLI directly to REALMS1066 if (defined $CLI{'hostauth'}) {1067 my @x = split(/:/, $CLI{'hostauth'});1068 1069 $REALMS{$db_realms_ctr}{'tid'} = "700500";1070 $REALMS{$db_realms_ctr}{'realm'} = (defined $x[2]) ? $x[2] : '@ANY';1071 $REALMS{$db_realms_ctr}{'pw'} = $x[1];1072 $REALMS{$db_realms_ctr}{'id'} = $x[0];1073 $REALMS{$db_realms_ctr}{'msg'} = "Credentials provided by CLI.";1074 1049 } 1075 1050 } … … 1151 1126 if ($line !~ /^\@/) { next; } 1152 1127 if ($line !~ /^\@.+\=.+$/i) { nprint("\t+ ERROR: Invalid syntax: $line"); } 1153 $ctr++;1154 }1155 nprint("\t$ctr entries");1156 }1157 elsif ($file eq 'db_realms') {1158 my $ctr = 0;1159 foreach $line (<IN>) {1160 if ((count_fields($line, 1) ne 4) && (count_fields($line) ne '')) {1161 nprint("\t+ ERROR: Invalid syntax: $line");1162 }1163 1128 $ctr++; 1164 1129 }
Note: See TracChangeset
for help on using the changeset viewer.