mirror of
https://github.com/nmap/nmap.git
synced 2026-08-27 03:48:14 +00:00
Add test for --output logging.
Fails for UDP, as reported at http://seclists.org/nmap-dev/2012/q2/805.
This commit is contained in:
parent
a7bc517df2
commit
9e553a2203
1 changed files with 22 additions and 0 deletions
|
|
@ -655,6 +655,28 @@ sub {
|
|||
};
|
||||
kill_children;
|
||||
|
||||
server_client_test_all "Messages are logged to output file",
|
||||
["--output", "server.log"], ["--output", "client.log"], sub {
|
||||
|
||||
syswrite($c_in, "abc\n");
|
||||
close($c_in);
|
||||
sleep 1;
|
||||
syswrite($s_in, "def\n");
|
||||
close($s_in);
|
||||
sleep 1;
|
||||
open(FH, "server.log");
|
||||
my $contents = join("", <FH>);
|
||||
close(FH);
|
||||
$contents eq "abc\ndef\n" or die "Server logged " . d($contents);
|
||||
open(FH, "client.log");
|
||||
$contents = join("", <FH>);
|
||||
close(FH);
|
||||
$contents eq "abc\ndef\n" or die "Client logged " . d($contents);
|
||||
};
|
||||
unlink "server.log";
|
||||
unlink "client.log";
|
||||
kill_children;
|
||||
|
||||
server_client_test_tcp_sctp_ssl "Debug messages go to stderr",
|
||||
["-vvv"], ["-vvv"], sub {
|
||||
my $resp;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue