1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-01 04:19:02 +00:00
david 25fdaf95f3 Use a large initial buffer in the call to GetAdaptersAddresses.
GetAdaptersAddresses is supposed to return ERROR_BUFFER_OVERFLOW and set
len to the required size when len is too small. So normally we would
call the function once with a small len, and then again with the longer
len. But, on Windows 2003, apparently you only get ERROR_BUFFER_OVERFLOW
the *first* time you call the function with a too-small len--the next
time you get ERROR_INVALID_PARAMETER. So this function would fail the
second and later times it is called.

So, make the first call using a large len. On Windows 2003, this will
work the first time as long as there are not too many adapters. (It will
still fail with ERROR_INVALID_PARAMETER if there are too many adapters,
but this will happen infrequently because of the large buffer.) Other
systems that always return ERROR_BUFFER_OVERFLOW when appropriate will
enlarge the buffer if the initial len is too short.
2012-05-10 21:29:54 +00:00
2012-03-07 03:15:51 +00:00
2012-03-19 16:48:27 +00:00
2012-03-07 17:59:55 +00:00
2010-05-23 17:42:44 +00:00
2008-07-31 14:18:21 +00:00
2012-03-19 16:48:27 +00:00
2012-03-31 03:21:22 +00:00
2012-05-05 18:02:34 +00:00

Here is some documentation for Nmap, but these files are much less
comprehensive than what you'll find at the actual Nmap documentation
site ( http://nmap.org ).
Languages
C 37.8%
Lua 28.1%
C++ 16.7%
Shell 5.8%
Python 4.2%
Other 7.2%