1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-28 10:29:03 +00:00
Commit Graph

71 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
henri
71963537cb Proper indentation. 2012-11-08 13:11:23 +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
henri
7dc93e0935 Close connection endpoint when receiving EOF on stdin. Patch by Michal Hlavinka. 2012-09-10 20:41:46 +00:00
david
f9867163da Use bye in place of fatal. 2012-08-28 14:29:37 +00:00
henri
af2f0960ab Automatically enforce the use of the nsock select engine if we detect that stdin
is a regular file.

Under linux, that provides epoll(7), this allows proper behavior when
redirecting a regular file to stdin (e.g.: 'ncat localhost < file.txt').

Bug was reported by Michal Hlavinka. See
http://seclists.org/nmap-dev/2012/q3/490 for more details.
2012-08-18 16:25:50 +00:00
david
607b209fd4 Whitespace.
indent -kr -i4 -nut -l0 -ss -T size_t *.c
with manual adjustments.
2012-06-19 00:21:27 +00:00
fyodor
684f42c4ad One more adjustment to the license text. Notes that Zenmap, Ncat, and Nping use this license. Note that contributions made directly in the src repository are treated the same as those in the mailing list. 2012-03-01 06:53:35 +00:00
fyodor
e96a7b7b24 Update the headers for each code file. This updates code copyright dates to 2012, notes the awesome NSE in the list of technology, and slightly rewords the derivative works clarification 2012-03-01 06:32:23 +00:00
david
ed2ba4e168 Copy nping, nsock, nbase, zenmap, ncat from their homes in /.
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.
2011-11-16 21:49:44 +00:00