2008-06-17 Sancho Lerena <slerena@artica.es>
* pandora_recon: First code to implement traceroute functionality using Pureperl module. Added code for remote OS fingerprinting. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@868 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
66d4c24a87
commit
f41b26f14c
|
@ -1,7 +1,8 @@
|
|||
2008-06-17 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* pandora_recon: First code to implement traceroute functionality
|
||||
using Pureperl module.
|
||||
using Pureperl module. Added code for remote OS fingerprinting.
|
||||
|
||||
|
||||
2008-06-16 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
|
|
|
@ -133,6 +133,52 @@ sub pandora_recon_subsystem {
|
|||
}
|
||||
}
|
||||
|
||||
##########################################################################
|
||||
# SUB pandora_detect_os (paconfig, host)
|
||||
# Detect OS using xprobe2 tool. Return tconfig_os id code.
|
||||
##########################################################################
|
||||
|
||||
sub pandora_detect_os {
|
||||
my $pa_config = $_[0];
|
||||
my $host = $_[1];
|
||||
|
||||
# my $pa_config->{"xprobe2"} = "/usr/bin/xprobe2";
|
||||
# my $xprobe2 = $pa_config->{"xprobe2"};
|
||||
my $xprobe2 = "/usr/bin/xprobe2";
|
||||
if (! -e $xprobe2){
|
||||
return 10;
|
||||
}
|
||||
my $command = `$xprobe2 $host 2> /dev/null | grep "Running OS" | head -1`;
|
||||
|
||||
if ($command =~ m/Windows/i){
|
||||
return 9;
|
||||
}
|
||||
elsif ($command =~ m/Linux/i){
|
||||
return 1;
|
||||
}
|
||||
elsif ($command =~ m/BSD/i){
|
||||
return 4;
|
||||
}
|
||||
elsif ($command =~ m/Cisco/i){
|
||||
return 7;
|
||||
}
|
||||
elsif ($command =~ m/SunOS/i){
|
||||
return 2;
|
||||
}
|
||||
elsif ($command =~ m/Solaris/i){
|
||||
return 2;
|
||||
}
|
||||
elsif ($command =~ m/AIX/i){
|
||||
return 3;
|
||||
}
|
||||
elsif ($command =~ m/HP-UX/i){
|
||||
return 5;
|
||||
}
|
||||
else {
|
||||
return 10;
|
||||
}
|
||||
|
||||
}
|
||||
##########################################################################
|
||||
# SUB pandora_exec_task (pa_config, id_task)
|
||||
# Execute task
|
||||
|
|
Loading…
Reference in New Issue