1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-14 11:49:01 +00:00
Commit Graph

164 Commits

Author SHA1 Message Date
henri
64fb5b3482 Added safe fd_set operations.
Only FD_SET and FD_CLR were available. Added a FD_ISSET equivalent.
Implemented them as static inline instead of macros for consistency.

These functions abort() if the FD number is higher than FD_SETSIZE
(except on windows where no check is performed).
2014-01-30 19:02:57 +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
d33tah
ccd0c02a4c Add a lacking space in the license comment. The command I used to do this is:
for file in `grep "* including the terms and conditions of this license text as well.       \*" * -r --files-with-match `; do sed "s/\* including the terms and conditions of this license text as well.       \*/* including the terms and conditions of this license text as well.        */g" -i $file; done
2013-09-11 19:06:20 +00:00
d33tah
384b9a1f8e Fix the syntax error from the previous commit (tried to compile under Linux). 2013-08-09 17:16:48 +00:00
d33tah
ece95926cb Fix the silly mistake that happened when copying code (using wrong variables). 2013-08-09 17:07:12 +00:00
d33tah
c68114f9bc Change the usleep call to match the other one. 2013-08-09 16:59:30 +00:00
d33tah
9f335c6bdb Merge in the fix for fselect Windows bug causing a CPU-intensive loop when we only select on stdin. 2013-08-09 13:02:43 +00:00
d33tah
b2187f6749 Remove most tabs in nbase. This probably needs some fixes, but the tabs really confused my vim. 2013-08-09 00:16:52 +00:00
fyodor
6e01ecd452 Update an email address, fix a typo, and slightly reword a sentence. 2013-07-30 00:02:00 +00:00
fyodor
83fb10ec56 Update the Nmap copyright/license files. This isn't the new Nmap Public Source License we've been discussing on the list, but rather just a 'quick patch' to hopefully prevent some of the abuse we've been seeing from companies lately. More details on the changes will be posted to the dev list. Also, the copyright year was updated to 2013 (which is the only change to Nsock license statements). 2013-07-28 22:05:05 +00:00
henri
63aa6d83fb Improved error handling in socket_block/unblock. 2013-07-18 20:29:29 +00:00
david
4fba0e5a9b Whitespace. 2013-07-03 04:30:41 +00:00
d33tah
b62709eb20 merging in the --lua-exec feature for ncat. 2013-07-02 16:56:03 +00:00
d33tah
85e52bf928 fix some typos in comments I found while reading Nbase's code 2013-06-28 15:37:20 +00:00
david
6b7b428cb9 Remove COMPAT_SRCS and COMPAT_OBJS.
These appear not to have any effect any more. They were initially used
to conditionally compile and link some files with replacements for
standard library functions, but seem not to have been used after r828
("Moved to nbase system for compatability funcs").
2013-05-13 04:21:11 +00:00
david
ebea23e398 Merge r30177 from nmap-npingchanges: Add function to generate random 64-bit unsigned integers
Originally committed by luis but recommitted by david after recovery
from backup.
2013-04-12 17:29:09 +00:00
david
87bab78479 Move CHECKED_FD_SET and CHECKED_FD_CLR to Nbase. 2013-02-22 00:45:57 +00:00
david
129d804d15 Add some missing noreturn and format attributes. 2013-02-22 00:45:55 +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
da88c7f26a Whitespace. 2013-01-08 04:37:34 +00:00
henri
a90bafc9f4 Fixed indentation & style.
indent -nut -i2 -kr -br -brs -brf -l0 -bad -npcs -nprs -ncs nbase_str.c
+ manual adjustements.
2012-12-20 18:15:59 +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
d81c7040f0 Update my email address in the places which had the old one 2012-12-10 01:34:21 +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
8d6dce4a01 Fix CRC32c calculation on 64-bit platforms.
Patch by Pontus Andersson.
http://seclists.org/nmap-dev/2012/q4/361
2012-12-01 23:03:05 +00:00
david
6ad551b872 Actually pass the bigger buffer size when padding with nulls. 2012-11-16 21:12:33 +00:00
david
b40d0e2982 Pad the device name of SO_BINDTODEVICE up to sizeof(int).
An apparent kernel bug in Linux 2.6.20 and earlier causes the
SO_BINDTODEVICE setsockopt to return EINVAL if the device name is too
short. Pad with null characters to avoid this.

http://article.gmane.org/gmane.linux.network/71887
http://article.gmane.org/gmane.linux.network/72216
2012-11-16 21:02: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
1e3115dbcb Renamed nmap_fileexistsandisreadable() by file_is_readable(). Former was
hardly readable and is not even a good candidate for longest method
name (http://msdn.microsoft.com/en-us/library/system.windows.media.textformatting.textsource.gettexteffectcharacterindexfromtextsourcecharacterindex.aspx#Y0)
2012-10-20 15:00:10 +00:00
david
6ec453e4e8 Add socket_bindtodevice function to Nbase.
The Linux-specific SO_BINDTODEVICE sockopt causes packets to be sent on
a specific interface, in cases where merely setting the source address
does not uniquely determine the interface.
2012-10-03 15:43:22 +00:00
david
7e5c9a8914 Regen with Autoconf 2.68 and aclocal 1.11.6.
for DIR in . nbase ncat nsock/src nping;
	do (echo $DIR; cd $DIR && aclocal --force && autoconf --force);
done
2012-09-19 16:41:35 +00:00
david
43a920120e Rename configlocal.m4 to acinclude.m4 for uniformity. 2012-09-19 16:41:31 +00:00
david
ad61d6de85 Remove unused aclocal.m4 files.
These aren't getting regenerated even with "aclocal --force"; I think
it's because there is nothing to put in them. Running "aclocal
--verbose" shows that all the required macros are in acinclude.m4 files:

aclocal: saw macro PCAP_IS_SUITABLE
aclocal: saw macro RECVFROM_ARG6_TYPE
aclocal: saw macro PCAP_IS_SUITABLE
aclocal: saw macro CHECK_IPV6_IPPROTO_RAW
aclocal: saw macro APR_FIND_APR
aclocal: ../acinclude.m4 is already included by configure.ac
2012-09-19 16:41:28 +00:00
david
ecf62c247a Check for and include <sys/select.h>.
This was reported as a build error by John Spencer using musl libc.
http://seclists.org/nmap-dev/2012/q3/776
2012-09-12 04:54:21 +00:00
david
fed81c865a Include <arpa/inet.h> in APR_CHECK_WORKING_GETNAMEINFO.
http://seclists.org/nmap-dev/2012/q3/777
2012-09-12 04:23:24 +00:00
david
2c092db698 Don't use exit in APR_CHECK_WORKING_GETNAMEINFO.
Same reason as r29737.

http://seclists.org/nmap-dev/2012/q3/777
2012-09-12 04:23:23 +00:00
henri
68a1545c83 Added missing SVN properties and Id tags 2012-09-10 20:53:09 +00:00
henri
0f521a8697 Indentation fixes:
$ indent -nut -i2 -kr -br -brs -brf -l0 -bad -npcs -nprs -ncs nbase_memalloc.c
2012-09-10 08:20:25 +00:00
david
6f61403f52 Don't use exit in APR_CHECK_WORKING_GETADDRINFO.
For the same reason as in r29737.
2012-09-08 19:45:38 +00:00
sean
982f26ccf6 Removed the pragma as liblua ignored it. 2012-06-21 04:25:25 +00:00
sean
663c44acc9 Tidied up the #pragma command 2012-06-21 04:16:04 +00:00
sean
0c1c89a022 Added a pragma to supress the lgc.c(988): warning C4146: unary minus operator applied to
unsigned type, result still unsigned. We don't want to fix liblua
2012-06-21 03:55:24 +00:00
sean
e111cb35db Fixed the other C4005 with EWOULDBLOCK EHOSTUNREACH ENETDOWN ENETUNREACH ENETRESET ETIMEDOUT EINPROGRESS ENOBUFS EMSGSIZE ENOBUFS _HAS_CPP0X so that now the Windows source of NMAP compiles without Compile time warnings. There are still link warnings though. 2012-06-12 02:10:56 +00:00
sean
3b1341508a -Tnother error C4005 this one for ECONNABORTED:
his line, and those below, will be ignored--

M    nbase/nbase_winunix.h
2012-06-12 01:48:42 +00:00
sean
a5d33580ea Added a comment with a pointer to the link on error C4800 2012-06-10 17:49:26 +00:00
sean
cd4fd5eee5 Fixed an error C4005: "C4005: 'ECONNRESET' : macro redefinition" by added a #undef above it 2012-06-10 17:48:50 +00:00
sean
87768241ec Fixed the warning about signed and unsigned comparision by changing j into an unsigned variable. 2012-06-10 17:30:40 +00:00