--- lib/PXElator/nmap.pm 2009/08/29 12:55:34 337 +++ lib/PXElator/nmap.pm 2009/08/29 20:41:17 349 @@ -32,6 +32,12 @@ my $count = 0; + my $port_name = { + 16992 => 'amt', + 4445 => 'asterisk', + 7777 => 'pxelator', + }; + while ( my $host = shift @{ $nmap->{host} } ) { warn '# host ',dump( $host ); @@ -47,7 +53,7 @@ client::conf( $ip, 'os' => $os ); } - my @ports = map { [ $_->{portid}, $_->{protocol}, $_->{service}->{name} ] } @{ $host->{ports}->{port} }; + my @ports = map { [ $_->{portid}, $_->{protocol}, $port_name->{$_->{portid}} || $_->{service}->{name} ] } @{ $host->{ports}->{port} }; client::conf( $ip, 'ports' => join("\n", map { join("\t", @$_) } @ports) ) if @ports; $count++;