mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
discovery os detection
This commit is contained in:
parent
f1ec7d2339
commit
97f246ae60
@ -360,8 +360,9 @@ sub PandoraFMS::Recon::Base::guess_os($$) {
|
|||||||
if (-x $self->{'pa_config'}->{'xprobe2'}) {
|
if (-x $self->{'pa_config'}->{'xprobe2'}) {
|
||||||
my $return = `"$self->{pa_config}->{xprobe2}" $device 2>$DEVNULL`;
|
my $return = `"$self->{pa_config}->{xprobe2}" $device 2>$DEVNULL`;
|
||||||
if ($? == 0) {
|
if ($? == 0) {
|
||||||
my ($output) = $a =~ /Running OS:(.*)/;
|
if($return =~ /Running OS:(.*)/) {
|
||||||
return pandora_get_os($self->{'dbh'}, $output);
|
return pandora_get_os($self->{'dbh'}, $1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -370,8 +371,9 @@ sub PandoraFMS::Recon::Base::guess_os($$) {
|
|||||||
my $return = `"$self->{pa_config}->{nmap}" -F -O $device 2>$DEVNULL`;
|
my $return = `"$self->{pa_config}->{nmap}" -F -O $device 2>$DEVNULL`;
|
||||||
return OS_OTHER if ($? != 0);
|
return OS_OTHER if ($? != 0);
|
||||||
|
|
||||||
my ($output) = $return =~ /Aggressive OS guesses:\s*(.*)/;
|
if ($return =~ /Aggressive OS guesses:\s*(.*)/) {
|
||||||
return pandora_get_os($self->{'dbh'}, $output);
|
return pandora_get_os($self->{'dbh'}, $1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return OS_OTHER;
|
return OS_OTHER;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user