[Nmap-scanner-general] Nmap::Scanner & CGI
Brought to you by:
perldork
From: <c99...@al...> - 2004-03-04 09:37:44
|
Hi, I'm having problems sending the output of the scan() function to the brow= ser, after the call to the function the browser stops, and i can't print anyth= ing. I've tried $|++, i'm running the script as a root, and i've also tried ve= rsion .7a of the Nmap::Scanner module. The script works fine in a shell. here's a snippet of the code... #!/usr/bin/perl use strict; use CGI; $|++; use Data::Dump qw(pp); use Nmap::Scanner; my $main =3D new CGI; print $main->header; my $scanner =3D Nmap::Scanner->new(); my $host =3D shift; $scanner->tcp_syn_scan(); $scanner->no_ping(); $scanner->add_scan_port('1'); $scanner->add_scan_port('80'); $scanner->guess_os(); $scanner->add_target($host); $scanner->version_scan(); my $results =3D $scanner->scan(); (can't send nothing to the browser from this point) . . . prints... . . . thanks ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. |