#!/usr/bin/perl use strict; use Nmap::Scanner; $| = 1; my @targets = "209.197.123.153", "216.92.34.251"; my $scanner = new Nmap::Scanner; $scanner->tcp_syn_scan(); $scanner->debug(1); $scanner->add_scan_port('1-1024'); $scanner->guess_os(); $scanner->max_rtt_timeout("200ms"); $scanner->add_target("66.39.54.27"); $scanner->max_parallelism(8); my $results = $scanner->scan(@targets); print $results->as_xml; my $host_list = $results->get_host_list(); while(my $host = $host_list->get_next()) { print "Found host named: ", $host->hostname() . "\n"; } exit 0;
In reply to Re: Nmap::Scanner breaks my while loop, I think
by Khen1950fx
in thread Nmap::Scanner breaks my while loop, I think
by jantelar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |