1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 04:09:01 +00:00
Commit Graph

97 Commits

Author SHA1 Message Date
david
fc80b4573c Track proxy socklen and pass it on to targetlen.
Patch by Joachim Henke.
http://seclists.org/nmap-dev/2013/q1/413
2013-05-05 10:43:53 +00:00
david
21a8af6c08 Fix Ncat IPv6 HTTP CONNECT proxy syntax.
Patch by Joachim Henke.
http://seclists.org/nmap-dev/2013/q1/413
2013-05-05 10:21:46 +00:00
david
e408faae10 Fix signed/unsigned confusion in subprocess_thread_func.
Andrey Olkhin found that a test was always true because of the
signedness of a type.
http://seclists.org/nmap-dev/2013/q1/210
2013-03-02 08:32:28 +00:00
david
c3d079a584 Namespace subprocess pipes by PID.
Patch by Andrey Olkhin.
http://seclists.org/nmap-dev/2013/q1/210
2013-03-02 07:34:49 +00:00
david
0fceb95b5a Whitespace. 2013-02-24 02:50:02 +00:00
david
ee4d1e126b Remove a close that made a test unreliable. 2013-02-23 06:54:31 +00:00
david
c60b72f7a0 XFAIL some tests having to do with EOF handling.
http://seclists.org/nmap-dev/2013/q1/227
2013-02-23 06:54:30 +00:00
david
811d6096e1 Quit on EOF in non-TCP mode.
Apparently SCTP can't have the same kind of half-open sockets that TCP
has. When one direction is closed, we can't do anything further with the
socket.
http://seclists.org/nmap-dev/2013/q1/227
2013-02-23 06:54:29 +00:00
david
a9cb84f189 Break out separate SCTP tests for half-open sockets.
These should have different behavior than TCP.
http://seclists.org/nmap-dev/2013/q1/227
2013-02-23 06:54:28 +00:00
david
84773c74a5 Switch to an o.proto option instead of o.udp and o.sctp.
This eliminates the ambiguity that could exist when, say, both o.udp and
o.sctp were both set. The code would use whichever it happened to test
first. This also makes TCP mode explicit with IPPROTO_TCP.
2013-02-23 05:56:00 +00:00
david
ce51d8c4da Use the default value of MultiThreadedDLL where possible. 2013-02-09 20:30:01 +00:00
david
6b095f42d2 Use MultiThreadedDebugDLL (/MDd) in place of MultiThreadedDebug (/MTd).
This is to match r8507, which did the analogous thing for the Release
configuration.
http://seclists.org/nmap-dev/2013/q1/120
2013-02-09 20:29:55 +00:00
david
9901c8e7a9 Close stdout on socket EOF. 2013-02-09 08:29:39 +00:00
david
88a35de3b5 Quit on socket EOF only in --recv-only mode.
Suggested by Tomas Hozza.
http://seclists.org/nmap-dev/2013/q1/188
2013-02-09 08:29:38 +00:00
david
81c777abfd Simplify connect-mode stdin EOF handling. 2013-02-09 08:29:37 +00:00
david
9a10429474 Round out EOF and shutdown tests.
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.
2013-02-09 08:29:36 +00:00
david
61255ee01e Retab ncat-test.pl. 2013-02-09 08:29:35 +00:00
david
a6dd675fd3 Don't do operations with side effects inside asserts.
ncat_assert is safe because it cannot be disabled. <assert.h> assert is
also safe because we make sure that NDEBUG remains defined. Doing this
helps avoid potential bad effects of something changing in the future.
2013-01-04 18:59:56 +00:00
david
63d9e8b5d5 Use ncat_assert in place of assert everywhere. 2013-01-04 18:59:47 +00:00
david
4519c2ec74 Assert that get_fdinfo doesn't return NULL.
Resolves these Parfait reports
(http://seclists.org/nmap-dev/2012/q4/412).

Error: Null pointer dereference (CWE 476)
    Read from null pointer 'fdn'
         at line 328 of components/nmap/build/amd64/ncat/ncat_core.c in function 'blocking_fdinfo_send'.
           Function 'get_fdinfo' may return constant 'NULL' at line 615, called at line 366 in function 'ncat_broadcast'.
           Constant 'NULL' passed into function 'blocking_fdinfo_send', argument 'fdn', from call at line 367.
           Null pointer introduced at line 615 of components/nmap/build/amd64/ncat/util.c in function 'get_fdinfo'.
         at line 330 of components/nmap/build/amd64/ncat/ncat_core.c in function 'blocking_fdinfo_send'.
           Function 'get_fdinfo' may return constant 'NULL' at line 615, called at line 366 in function 'ncat_broadcast'.
           Constant 'NULL' passed into function 'blocking_fdinfo_send', argument 'fdn', from call at line 367.
           Null pointer introduced at line 615 of components/nmap/build/amd64/ncat/util.c in function 'get_fdinfo'.
Error: Null pointer dereference (CWE 476)
    Read from null pointer 'fdn'
         at line 946 of components/nmap/build/amd64/ncat/ncat_listen.c in function 'shutdown_sockets'.
           Function 'get_fdinfo' may return constant 'NULL' at line 615, called at line 945.
           Null pointer introduced at line 615 of components/nmap/build/amd64/ncat/util.c in function 'get_fdinfo'.
2012-12-22 06:02:30 +00:00
david
d98bbcc8ab Add an ncat_assert macro.
This is an assert that will remain even if NDEBUG is defined.
2012-12-22 06:02:25 +00:00
david
93b978fba8 Merge 30432:30436 from /nmap-exp/david/ipv6-ranges.
This is simple IPv6 unicast ranges. For example,
nmap -6 en.wikipedia.org/120 -sn

The other, more complicated part of this overall change is automatic
multicast scanning of large local subnets. That part isn't done yet.
2012-12-19 01:10:39 +00:00
henri
809f1eda68 Merged nsock-logging from nmap-exp/henri/nsock-logging/
Reworked the logging infrastructure to make it more flexible
and consistent.

Updated nmap, nping and ncat accordingly.  Nsock log level can
now be adjusted at runtime by pressing d/D in nmap.
2012-12-15 10:59:30 +00:00
fyodor
a90d961f51 auto-generated files (nroff versions of man pages) 2012-12-10 01:17:51 +00:00
fyodor
8f585c7882 Update my email address: fyodor@insecure.org => fyodor@nmap.org 2012-12-10 01:14:42 +00:00
dmiller
9e6d7b2384 Change test-addrset.sh to be POSIX sh compliant 2012-12-06 18:46:29 +00:00
david
ec53dc049a Update with new mailing list addresses. 2012-12-06 02:23:34 +00:00
fyodor
6a42ef47c0 Update the Nmap and Nsock source code headers to note new Nmap dev mailing list email address and a better URL for Nmap license. 2012-12-06 01:21:42 +00:00
david
0cd8c9d6e5 Make test-addrset.sh exit with nonzero status if any tests fail.
Patch by Andreas Stieger.
http://seclists.org/nmap-dev/2012/q4/385
2012-12-05 06:48:15 +00:00
fyodor
e09125e010 Update CHANGELOG to note 6.25 release and also bumped up Nmap SVN version number to avoid confusion and rebuilt files accordingly 2012-11-29 23:40:26 +00:00
david
2ffd03dfc3 Add define for SHUT_WR on Windows.
The same as was applied for a similar change in r29743.
2012-11-29 19:35:27 +00:00
david
48e94596af Add a forward declaration for shutdown_sockets. 2012-11-29 19:35:26 +00:00
david
dc5d51f335 Fix copy-paste error in Ncat timeout warning messages.
Patch by Michal Hlavinka.
http://seclists.org/nmap-dev/2012/q4/351
2012-11-29 18:36:31 +00:00
david
297e0a1dfd shutdown write socket on stdin EOF in listen mode.
http://seclists.org/nmap-dev/2012/q4/337
2012-11-29 03:51:06 +00:00
david
9f3fa403ef Automatically create and delete a source Unix domain DGRAM socket.
Patch based on one by Tomas Hozza.
http://seclists.org/nmap-dev/2012/q4/334
2012-11-27 21:47:26 +00:00
fyodor
89d84932de Regenerated the man pages with today's date 2012-11-16 19:09:59 +00:00
fyodor
ea05ae2586 Latest auto-generated files in prep for upcoming 6.20BETA1 release 2012-11-16 00:54:16 +00:00
henri
9d7c017cf7 Use the fallback nsock engine by default in order to maximize
compatibility between systems and use cases. [Henri Doreau]

There were known issues with the following cases:
  * epoll and regular files
  * kqueue and regular files
  * WSAPoll and stdin

The --nsock-engine=<ENGINE> can still be used to bypass this
default choice.

See: http://seclists.org/nmap-dev/2012/q4/173
2012-11-13 08:40:49 +00:00
david
cc4eb9f381 Disable automatic generation of datagram Unix domain source socket.
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.
2012-11-12 20:44:45 +00:00
david
e017de82bb Short section on -U in ncat man page. 2012-11-12 20:44:43 +00:00
david
fde17a1e40 Tests for UNIX sockets implementation in Ncat
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").
2012-11-12 20:44:41 +00:00
david
6531a19892 Implementation of UNIX-domain sockets for Ncat
Implementation of UNIX sockets for Ncat using
also UNIX-domain sockets functionality from
Nsock library. Added new argument "-U".
2012-11-12 20:44:40 +00:00
david
c5f632382f Show an error instead of silently falling back to AF_INET6. 2012-11-12 19:34:23 +00:00
david
0d3a8846b0 Set target port number based on target af, not o.af.
o.af is AF_UNSPEC at this point in the common case that neither -4 nor
-6 was given. The code was falling through to the "else" IPv6 case. I
think we were getting luck with this because the port number happens to
be in the same place in sockaddr_in and sockaddr_in6.
2012-11-12 19:34:22 +00:00
david
665e6b9e70 Whitespace. 2012-11-12 19:01:01 +00:00
david
c92d25dfcb Fix ncat man page typo. 2012-11-12 18:11:58 +00:00
henri
71963537cb Proper indentation. 2012-11-08 13:11:23 +00:00
henri
eec3669ed4 Update ncat test suite to take new ncat behavior into account.
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.
2012-11-08 08:04:16 +00:00
henri
58418396a8 Make nping and ncat fail (the way nmap does) when invalid nsock engines are supplied. 2012-10-29 10:22:32 +00:00
henri
84c80a7b34 Make ncat unconditionally use the select engine on windows. WSAPoll()
can't handle read events on stdin. This is a workaround intended to
mitigate the issue until we implement a fpoll function in nbase.
2012-10-26 09:40:14 +00:00