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

99 Commits

Author SHA1 Message Date
henri
06219414a6 Initial version with a _very_ raw support for HTTP proxy chains (using the
CONNECT method). This is mostly intended to validate the concepts, data models
and programming approach.
2013-04-22 19:28:53 +00:00
henri
6d9a68ecb9 Code cleanup.
Removed unused nse.time_created field.
Use bitfields instead of integers for nse.eof and nse.event_done
Indentation fixes.
2013-04-19 23:21:40 +00:00
david
87bab78479 Move CHECKED_FD_SET and CHECKED_FD_CLR to Nbase. 2013-02-22 00:45:57 +00:00
david
6e674f5cf5 Use an fprintf and abort instead of Nsock's fatal.
In preparation for move to Nbase.
2013-02-22 00:45:56 +00:00
david
d50afbca7d Fix some format string mismatches (int versus long int). 2013-02-22 00:45:55 +00:00
david
129d804d15 Add some missing noreturn and format attributes. 2013-02-22 00:45:55 +00:00
david
658b8648c6 Remove declartion of nonexistent myerror. 2013-02-22 00:45:54 +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
henri
b4400d0a44 Added static inline wrappers to simplify calls to I/O engine functions. 2013-01-23 22:06:40 +00:00
henri
a7f2788b26 Removed another forgotten vestige of nsock_trace. 2013-01-23 22:06:35 +00:00
henri
0e5e939c00 Added a special NSOCK_LOG_NONE value, to disable all messages. 2013-01-23 21:25:01 +00:00
david
eb98386809 Remove vestiges of nsp_settrace.
Now you call nsock_set_log_function then nsock_set_loglevel.
http://seclists.org/nmap-dev/2013/q1/72
2013-01-22 23:40:16 +00:00
henri
0d58167dcf fixed format string! 2013-01-10 19:19:15 +00:00
henri
d878062cc7 Added format attribute to __nsock_log_internal.
This allows log format strings to be checked at compile time.
2013-01-10 19:19:09 +00:00
henri
fb90c4ff33 Replaced the LOWER_MAX_FD macro by a static inline function. 2013-01-07 21:54:07 +00:00
henri
941b73ac8a Minor style fixes. 2012-12-29 15:59:59 +00:00
henri
b6765c03fa Fixed SUN_LEN definition in nsock.h.
Added missing parenthesis to nsock's SUN_LEN for platforms
where the macro isn't defined.

Report and patch by Conor McCarthy
2012-12-24 23:29:18 +00:00
henri
2774c8cce6 Filespace code cleanup.
- Removed dead code.
- Fixed style, improved consistency.
- Replaced FILESPACE_LENGTH and FILESPACE_STR macros by identical
  static inline functions.
- Made fs_cat() a regular function. There's no actual benefit of
  having it inlined.
2012-12-22 21:59:38 +00:00
henri
f2757be055 Proper error reporting during socket creation and initialization. 2012-12-20 18:10:54 +00:00
henri
b0fe74e355 More log message cleanup. Use __func__ when referring to the current function's name. 2012-12-15 18:21:09 +00:00
henri
3206c48aab Normalized log messages. No idea why I initially put underscores instead of spaces there. 2012-12-15 18:16:59 +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
david
ab802a6f21 Update some more headers. 2012-12-06 02:25:46 +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
2bfeace798 Make it an error in nsock_make_socket if AF_UNIX can't bind.
http://seclists.org/nmap-dev/2012/q4/345
2012-11-29 03:31:50 +00:00
david
d52a6fd23c Straighten out port computation in nsock_connect_internal.
There was a bug here where AF_INET6 was used instead of AF_UNIX in the
HAVE_SYS_UN_H section. This masked another bug, which was that the
HAVE_SYS_UN_H section inadvertently extended into what was supposed to
be the HAVE_IPV6 section.
2012-11-27 21:47:25 +00:00
david
d81b4112a0 Don't add rc to write_count when rc is negative.
Noticed by Tomas Hozza.
2012-11-26 22:13:30 +00:00
david
0232192312 Move inclusion of <errno.h> to after HAVE_POLL.
Suggested by Henri.
http://seclists.org/nmap-dev/2012/q4/286
2012-11-20 19:43:55 +00:00
david
8f5ed637f9 Include <errno.h> in engine_poll.c for EINTR.
I'm not sure why I wasn't seeing this error before:
engine_poll.c: In function ‘poll_loop’:
engine_poll.c:352:46: error: ‘EINTR’ undeclared (first use in this function)
engine_poll.c:352:46: note: each undeclared identifier is reported only once for each function it appears in
2012-11-20 18:59:41 +00:00
david
641dddafb5 Use socket_bindtodevice instead of bare setsockopt in Nsock. 2012-11-16 21:02:57 +00:00
david
8dd3a8a66e Fix SO_BINDTODEVICE Nsock error message. 2012-11-16 21:02:54 +00:00
fyodor
ea05ae2586 Latest auto-generated files in prep for upcoming 6.20BETA1 release 2012-11-16 00:54:16 +00:00
david
7b371609a3 Refactor get_hostaddr_string to get_peeraddr_string.
All the information passed as arguments is present in an iod, and we
only call this with members of one iod. Change it to accept just an iod
as an argument.
2012-11-12 20:44:49 +00:00
david
f5ac3e9f4e Put brackets on PEER_STR_LEN.
Maybe we'll decide to add these; anyway more space doesn't hurt.
2012-11-12 20:44:46 +00:00
david
f01e3800fb Implementation of UNIX-domain sockets for Nsock.
Implementation of UNIX-domain sockets functionality
for Nsock. Also some minor necessary changes to
existing Nsock functions, to work properly with
UNIX-domain sockets.
2012-11-12 20:44:37 +00:00
henri
99424a2b3e Only set HAVE_POLL on Vista and later.
Patch by Gisle Vanem
2012-11-02 10:53:24 +00:00
henri
cb3d88247b Fixed function name in error message. 2012-10-30 09:45:14 +00:00
henri
4b1e2a94bb A couple adjustemnt for windows.
- Do not set the X flags as events to be watched.
  - Do not use POLLPRI as a R flag.

Not doing so causes WSAPoll() to fail with an "invalid argument" error.
2012-10-22 17:57:58 +00:00
henri
ef9f4fcba5 Reverted r30104 and r30105. 2012-10-22 17:17:28 +00:00
henri
34b0f235cd Include nbase_winunix.h from nsock_internal.h 2012-10-22 15:55:46 +00:00
henri
aef88b5b1b Do not include Winsock.h before including nsock_internal.h (that
includes nbase_winconfig.h). Otherwise WSAEINTR doesn't get redefined
as EINTR as desired.
2012-10-22 15:43:30 +00:00
henri
9865b8f828 Cleaning up: consistently get event masks from a static inline get_evmask() function. 2012-10-22 04:26:19 +00:00
david
62570b7be7 Needed for HAVE_POLL. 2012-10-22 02:16:35 +00:00
david
0176367387 Regen configure. 2012-10-21 23:22:37 +00:00
henri
0d3dda36d4 Added new poll and kqueue/kevent nsock engines.
poll should be available almost everywhere.
kqueue/kevent are available on BSD systems (including MacOS).
2012-10-21 23:20:35 +00:00
henri
4cedcef575 Separate engine names by spaces instead of commas for consistency with
the other lines produced by nmap -V
2012-10-21 22:56:54 +00:00
henri
e76d41fa04 Don't fatal() in nsock_set_default_engine()
Return negative value instead. Moved the fatal() statement to nmap.cc
2012-10-21 22:56:53 +00:00
henri
3d2eeaa94d Finally added a function to list the available nsock engines. 2012-10-21 20:21:01 +00:00
henri
615de92974 Ensure that the nsock engine_hint refers to a valid one. If not, abort
execution.
2012-10-21 19:44:26 +00:00