Although $((arithmetic expansion)) is POSIX-specified, some systems have
non-POSIX System V shell, which can't handle it. This patch replaces
$((something)) with $(expr something) to fix compatibility. This
actually slows things down considerably, since a subshell must be
launched for each increment operation, but the tests aren't that
critical. Bug report: http://seclists.org/nmap-dev/2013/q4/198
This patch adds tests for idle timeout in listen mode
for all supported protocols. It also modifies existing
test for idle time in connection mode to test the option
for all supported protocols.
Signed-off-by: Tomas Hozza <thozza@redhat.com>
The existing tests here didn't make much sense, and didn't cover all the
situations we care about. The 8 tests now check each of
client !--send-only EOF on stdin
client --send-only EOF on stdin
server !--send-only EOF on stdin
server --send-only EOF on stdin
client !--recv-only EOF on socket
client --recv-only EOF on socket
server !--recv-only EOF on socket
server --recv-only EOF on socket
The other thing we care about is whether the client/server keeps running
after the EOF. That is now checked in each of the tests too.
This code was not always properly cleaning up automatically generated
sockets; for example in the case of "Connection refused". It would
delete sockets even if you gave one manually with --source; it's not
clear that's the right behavior.
Added tests for UNIX domain sockets to the ncat_test.pl
script. Added tests for:
1. listening on and connecting to UNIX STREAM socket.
2. listening on and connecting to (client with random
socket) UNIX DGRAM socket.
3. connecting to UNIX DGRAM socket with given source
socket (with "-s").
Since r29743, ncat closes connection after reading EOF. This patch first
introduces a new test to verify it, and also updates two existing tests
to prevent them from closing STDIN too early.
"test/test-wildcard.c: In function ‘test’:
test/test-wildcard.c:159:5: warning: value computed is not used [-Wunused-value]
I simpily voided the BIO_destroy_bio_pair return value which was a long wrapped value from OPENSSL.
If you have trouble updating after this revision you need to follow
these instructions. You have probably just seen an error like this:
svn: URL 'svn://svn.insecure.org/nping' of existing directory 'nping'
does not match expected URL 'svn://svn.insecure.org/nmap/nping'
This is caused by the replacement of SVN externals.
Here's what you need to do. First, save any local changes you might have
in the nping, nsock, nbase, ncat, and zenmap directories. (For example
by running "cd nping; svn diff > ../nping.diff".) If you don't have any
local changes you can skip this step.
Then run these commands:
rm -rf nping/ nsock/ nbase/ ncat/ zenmap/
svn update
svn cleanup
If all else fails, you can just delete your whole working directory and
check out anew:
svn co --username guest --password "" svn://svn.insecure.org/nmap
There may be further discussion in the mailing list thread at
http://seclists.org/nmap-dev/2011/q4/303.