tobbo has asked for the wisdom of the Perl Monks concerning the following question:
my $cmd = "/usr/bin/nmap " . $self->settings . " -oX " . $self->report +file . " -v " . $self->target . " |"; close STDOUT; open(F, $cmd); my $buf = ""; while(<F>){ $buf .= $_; #do something here }
It works well if the settings attribute is "-sT", but not if it is "-sU". So obivously i thought that it's a nmap problem, but if I print out $cmd and execute it manually it works like a charm.
So my question is, could this be in any way a Perl problem?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: A weird problem while executing nmap and fetching its output
by Anonymous Monk on Apr 11, 2013 at 01:54 UTC | |
by tobbo (Novice) on Apr 11, 2013 at 13:13 UTC | |
by LanX (Saint) on Apr 11, 2013 at 13:27 UTC |