some fixes
This commit is contained in:
22
malwaresh.pl
22
malwaresh.pl
@@ -729,22 +729,22 @@ $start_dir =~ s/\/lp-msh-scanner//;
|
||||
$start_dir = substr($start_dir, 0, rindex($start_dir, '/'));
|
||||
dir ($start_dir);
|
||||
|
||||
print "<br />\n<br />\n";
|
||||
print 'Infected Files (' . scalar(@file_list) . "):<br />\n";
|
||||
print "\n\n";
|
||||
print 'Infected Files (' . scalar(@file_list) . "):\n";
|
||||
foreach my $file (@file_list) {
|
||||
print "$file<br />\n";
|
||||
print "$file\n";
|
||||
}
|
||||
print "<br />\n<br />\n";
|
||||
print 'Possibly Infected Files (' . scalar(keys(%possible_list)) . "):<br />\n";
|
||||
print "\n\n";
|
||||
print 'Possibly Infected Files (' . scalar(keys(%possible_list)) . "):\n";
|
||||
foreach my $key (keys(%possible_list)) {
|
||||
print "$key => $possible_list{$key}<br />\n";
|
||||
print "$key => $possible_list{$key}\n";
|
||||
}
|
||||
|
||||
sub dir {
|
||||
my ($start_dir) = @_;
|
||||
|
||||
unless (opendir(DIR, $start_dir)) {
|
||||
print "Skipping directory $start_dir: $! <br />";
|
||||
print "Skipping directory $start_dir: $! ";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -768,17 +768,17 @@ foreach my $file (sort @files) {
|
||||
print "Scanning $start_dir/$file... ";
|
||||
|
||||
unless (-r "$start_dir/$file") {
|
||||
print " Skipping file, unable to read file<br />";
|
||||
print " Skipping file, unable to read file\n";
|
||||
next
|
||||
}
|
||||
if ((-s "$start_dir/$file") > 1024000) {
|
||||
print " Skipping file, over 1MB<br />";
|
||||
print " Skipping file, over 1MB\n";
|
||||
next
|
||||
}
|
||||
|
||||
my $fh;
|
||||
unless (open ($fh, '<', "$start_dir/$file")) {
|
||||
print " Unable to read file, $!<br />";
|
||||
print " Unable to read file, $!\n";
|
||||
next
|
||||
}
|
||||
|
||||
@@ -799,7 +799,7 @@ my ($infected, $cleaned, $possible, $known, $sig);
|
||||
}
|
||||
|
||||
|
||||
print $infected ? ($cleaned ? "<font color='green'>Infected, Cleaned<br /></font>\n" : "Infected, Cleaning failed<br />\n") : ($possible ? "Possibly Infected<br />\nSignature Unknown: $sig<br />\n" : "Not infected<br />\n");
|
||||
print $infected ? ($cleaned ? "Infected, Cleaned\n" : "Infected, Cleaning failed\n") : ($possible ? "Possibly Infected\nSignature Unknown: $sig\n" : "Not infected\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user