projects
/
mirror
/
dsa-nagios.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ peter@palfrader.org-20080623071923-ek2m28u2alttindo]
[mirror/dsa-nagios.git]
/
dsa-nagios-nrpe-config
/
weak-ssh-keys-check
diff --git
a/dsa-nagios-nrpe-config/weak-ssh-keys-check
b/dsa-nagios-nrpe-config/weak-ssh-keys-check
index
a1a5294
..
68b73b6
100755
(executable)
--- a/
dsa-nagios-nrpe-config/weak-ssh-keys-check
+++ b/
dsa-nagios-nrpe-config/weak-ssh-keys-check
@@
-194,7
+194,7
@@
sub from_ssh_key_file ($) {
my $name = shift;
if (open (my $FH, '<', $name)) {
my $key = <$FH>;
my $name = shift;
if (open (my $FH, '<', $name)) {
my $key = <$FH>;
- if ($key =~ m/
^
ssh-dss/) {
+ if ($key =~ m/ssh-dss/) {
$dsa_keys++;
$text .= "$name is a DSA key\n";
}
$dsa_keys++;
$text .= "$name is a DSA key\n";
}
@@
-229,7
+229,7
@@
sub from_ssh_auth_file ($) {
clear_tmp $tmp;
next if $line =~ m/^$/; # ignore empty lines
next if $line =~ m/^#/; # ignore comments
clear_tmp $tmp;
next if $line =~ m/^$/; # ignore empty lines
next if $line =~ m/^#/; # ignore comments
- if ($line =~ m/
^
ssh-dss/) {
+ if ($line =~ m/ssh-dss/) {
$dsa_keys++;
$text .= "$name:$lineno is a DSA key\n";
}
$dsa_keys++;
$text .= "$name:$lineno is a DSA key\n";
}
@@
-253,6
+253,7
@@
sub from_ssh_host (@) {
my $tmp = new File::Temp;
for my $line (@lines) {
next if $line =~ /^#/;
my $tmp = new File::Temp;
for my $line (@lines) {
next if $line =~ /^#/;
+ next if $line =~ /^no hostkey alg/;
my ($host, $data) = $line =~ /^(\S+) (.*)$/;
clear_tmp $tmp;
print $tmp "$data\n" or die "print: $!";
my ($host, $data) = $line =~ /^(\S+) (.*)$/;
clear_tmp $tmp;
print $tmp "$data\n" or die "print: $!";