1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-26 17:39:03 +00:00
Commit Graph

486 Commits

Author SHA1 Message Date
dmiller
e4417d132e Fix a stack overrun in ncat's -g option
Because of the postincrement and <= operators, the parsing could write
as many as 10 struct in_addr into an array allocated for only 8.
Execution would stop because of a later check. Instead, we use
preincrement and < operator to do bounds checking, and check for the
"too many specified" condition with another call to strtok (which should
return NULL if there were no more hops to parse)
2014-11-11 22:15:50 +00:00
dmiller
29ce5da5a1 Fix man pages, corrupted from auto-generation
The docbook-to-nroff XSL pages turn indexterms into nroff comments, but
have a bug: If the closing indexterm element is not followed by
whitespace and cdata, then the following element or cdata is stuck on
the same line as the comment. Fixed this temporarily by introducing
whitespace between </indexterm> and following cdata or by moving the
indexterm elements after any other element (<command>, <term>, etc.)
that they reference.
2014-10-22 19:24:28 +00:00
dmiller
3b6ea5a9e5 Fix Ncat crash on concurrent ssl connections
Reported on debian bugtracker here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=724580

We can't remove an fdinfo from client_fdlist and still expect to access
the fdinfo via a pointer we got from get_fdinfo(&client_fdlist) since
rm_fd() modifies the data at the address pointed to. So instead of
removing it from the list and then adding it right back, we just don't
remove it in the first place.
2014-10-21 05:50:36 +00:00
dmiller
5f7f87b74b Bump version from 6.46 to 6.47SVN 2014-08-29 18:43:18 +00:00
dmiller
5adfb3b1de Update copyright notice to 2014 2014-08-16 01:52:33 +00:00
jay
8d5ec9e310 Reapply r33420, r33421. Fix a missing right parenthesis. https://xkcd.com/859/ 2014-08-15 12:09:22 +00:00
fyodor
f6f59a7cd7 Auto regeneration with latest template files, etc. 2014-08-13 22:57:43 +00:00
jay
d4cf544df6 Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file 2014-08-02 19:29:50 +00:00
dmiller
e7cd3a7f1e Fix ncat tests
google.com can resolve to a different set of addresses each time you
resolve it, which makes the addrset tests fail. Use scanme.nmap.org
instead, since (at least for now) that has only one address assigned.
2014-08-02 04:38:02 +00:00
dmiller
b822aa9785 Fix Ncat's SOCKS5 password auth
See http://seclists.org/nmap-dev/2014/q3/4
2014-07-25 15:07:44 +00:00
dmiller
ec9074f718 Correct "it's" to "its" where necessary
it's = it is
its = belonging to it
2014-06-19 04:58:46 +00:00
fyodor
9020e77633 fix some XML syntax errors (some attempted closing tags were missing the slash they are supposed to start with) 2014-06-12 09:36:03 +00:00
jay
742b267c67 When Ncat is compiled without OpenSSL and if --ssl argument(s) are given, then show error message that OpenSSL was not compiled in. 2014-05-22 10:22:37 +00:00
fyodor
b23000e08e Update Nmap version number from 6.45 to 6.46 and regen docs 2014-04-18 04:36:33 +00:00
fyodor
52dc994b05 regenerate man pages and resort nmap-os-db 2014-04-12 08:12:04 +00:00
fyodor
6bf513b42a Update Nmap version number from 6.41SVN to 6.45 and rebuild docs 2014-04-11 02:59:07 +00:00
david
0c4cf69074 Use a separate boolean to remember whether Content-Length was set.
Previous content_length == 0 was overloaded to mean that Content-Length
was set. But that was wrong when the Content-Length was actually 0.

The error message you got when running an HTTP proxy that received
0-length POSTs was
	POST request with no Content-Length.
2014-03-07 16:57:42 +00:00
david
d5d8cd3033 Add tests for 0-length POSTs.
The non-chunked one fails for me.
FAIL HTTP POST Content-Length: 0
     Read timeout at ./ncat-test.pl line 2087.
2014-03-07 05:54:48 +00:00
dmiller
1575c63d7d Spellcheck for Ncat, Nping source files 2014-02-20 21:22:22 +00:00
henri
c9fe124e3d Moved variable definitions to the beginning of the block 2014-02-12 19:09:44 +00:00
d33tah
9365d50cad Fix coding style. 2014-02-12 09:50:27 +00:00
d33tah
b53187bad7 Apply a patch related to MSVC, reported by Gisle Vanem: http://seclists.org/nmap-dev/2014/q1/161 2014-02-12 09:49:39 +00:00
henri
21b7e3818d [Ncat] Added support for socks5 and corresponding regression tests.
[Marek Lucaszuk, Petr Stodulka]
2014-02-09 14:10:04 +00:00
dmiller
44e251306e Re-autoconf the configure scripts (using 2.69) 2013-12-11 23:17:47 +00:00
dmiller
a379a8ba2b Use CPPFLAGS for -I, not CFLAGS or CXXFLAGS
CPPFLAGS is for the C Pre-Processor, and should be used for -I flags. In
a couple cases (nping, nmap) this was resulting in duplicate -Ilibpcap
arguments.
2013-12-11 23:17:42 +00:00
dmiller
46eb0fed75 Be more compatible with SysV sh
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
2013-12-03 19:11:12 +00:00
dmiller
6d79c7646b Remove duplicate check for -ldl in ncat/configure 2013-12-03 18:04:38 +00:00
fyodor
65309b5c20 Fixed compilation when --without-liblua is specified 2013-11-10 02:04:17 +00:00
david
27af1d09df Use 1-indexing for first char of Lua string.
sub(0, 1) worked, but it's more clear to do sub(1, 1).
2013-10-14 01:35:44 +00:00
david
5657e7e00b Make test-environment.lua a bit more straightforward. 2013-10-04 22:42:13 +00:00
david
d05d8acd93 Revert r32397, r32398, r32399 (tempnam to mkstemp).
I had intended the unlink to appy only to unix domain sockets, but it
was being called for every kind of local address.

http://seclists.org/nmap-dev/2013/q3/647
2013-09-27 15:30:18 +00:00
dmiller
db6f6ea069 s/tempnam/mkstemp/ in error message to reflect actual usage. 2013-09-27 14:43:26 +00:00
david
e18b25bccd Use tempfile in place of tempnam.
To avoid new GCC warnings about tempnam:
ncat_connect.c:789: warning: the use of `tempnam' is dangerous, better use `mkstemp'

Doing things this way has the same race condition as tempnam did,
because we are unlinking the file before binding it. (The race window is
smaller now.) The file must not exist before binding the Unix socket, or
else you get an "address already in use" error. Unlinking before binding
is the same thing that netcat-openbsd does. See this earlier thread:
http://seclists.org/nmap-dev/2012/q4/336.
2013-09-26 07:17:08 +00:00
david
e4af8d90d8 Add tempfile function. 2013-09-26 07:17:03 +00:00
d33tah
b7a5a6cfc3 Replace some of the rules with per-directory ones. 2013-09-15 20:17:14 +00:00
d33tah
5f7acbb103 Change the comment. 2013-09-15 20:17:08 +00:00
d33tah
8fa61605ba Reorder the checks a bit. 2013-09-15 20:17:03 +00:00
d33tah
800acc5ac1 Change the comment. 2013-09-15 20:16:58 +00:00
d33tah
29d07d7748 Disallow any backslashes. 2013-09-15 15:45:01 +00:00
d33tah
541d49980b Whitespace. 2013-09-15 15:44:56 +00:00
d33tah
f595259310 Replace the current list of checks with a is_valid_path function. 2013-09-15 15:44:51 +00:00
d33tah
8654d12050 Update the httpd.lua comment, the "list the directory contents" is irrelevant. 2013-09-12 18:35:42 +00:00
d33tah
2fde134f36 fflush stderr in all messages sent by Ncat. This makes
it more comfortable to test Ncat under Cygwin, which
doesn't fflush even if the message contains \n.
(At least not in my ssh+screen+zsh combination).
2013-09-12 14:23:24 +00:00
david
28599f1567 Revert r32301..r32306.
Committed accidentally.
2013-09-12 08:20:13 +00:00
david
08e38545a3 Add connect-mode recv() and send() support. 2013-09-12 08:12:25 +00:00
david
bc96871709 Add null.lua, a filter meant for testing supersocket. 2013-09-12 08:12:20 +00:00
david
39fa14d614 Add script loading facilities. 2013-09-12 08:12:16 +00:00
david
8d796f8981 Add ncat_main.c facilities for -L. Currently still with the ugly
o.script name.
2013-09-12 08:12:11 +00:00
david
ecd7a45ec2 Restore the dump_stack routine, it's really useful for debugging. 2013-09-12 08:12:07 +00:00
david
42ce2bc9cc Apply my refactoring changes from r31989. 2013-09-12 08:12:03 +00:00