[go: nahoru, domu]

Skip to content

Commit

Permalink
Fix for sullo#592 - resolve path error
Browse files Browse the repository at this point in the history
  • Loading branch information
sullo committed Mar 26, 2019
1 parent 7b77c70 commit b2240b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions program/nikto.pl
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ sub config_init {
}

# Guess Nikto current directory
my $NIKTODIR = $0;
my $NIKTODIR = abs_path($0);
chomp($NIKTODIR);
$NIKTODIR =~ s#[\\/]nikto.pl$##;

Expand Down Expand Up @@ -277,6 +277,7 @@ sub load_modules {
my $errors=0;
my @modules = qw/Getopt::Long Time::Local IO::Socket Net::hostent/;
push(@modules,"List::Util qw(sum)");
push(@modules,"Cwd 'abs_path'");
foreach my $mod (@modules) {
eval "use $mod";
if ($@) {
Expand Down Expand Up @@ -334,7 +335,7 @@ sub load_config {
#################################################################################
# find plugins directory
sub setup_dirs {
my $CURRENTDIR = $0;
my $CURRENTDIR = abs_path($0);
chomp($CURRENTDIR);
$CURRENTDIR =~ s#[\\/]nikto.pl$##;
$CURRENTDIR = "." if $CURRENTDIR =~ /^nikto.pl$/;
Expand Down

0 comments on commit b2240b9

Please sign in to comment.