1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-14 18:39:03 +00:00
Commit Graph

8697 Commits

Author SHA1 Message Date
david
afd483a2d6 Key digest output convention. 2012-09-08 16:22:23 +00:00
david
170df4fa54 Add docs section on structured output conventions.
Covering stdnse.format_timestamp.
2012-09-08 16:09:21 +00:00
david
87bce81b8c Use stdnse.format_timestamp in scripts that output structured dates. 2012-09-08 16:09:15 +00:00
david
e9b2a8aa5d Add stdnse.format_timestamp function.
This function follows RFC 3339 and is going to be the standard formatter
for dates and times in structured output.
2012-09-08 16:09:04 +00:00
david
ac87c9b251 Add stdnse.date_to_timestamp function.
This takes a broken-down date table, as produced by os.date("*t"), and
converts it into an integer number of seconds since the epoch UTC,
interpreting it as a time in a given time zone. Simply passing a date
table to os.time is not good enough, because os.time always assumes the
date table represents a local time; i.e., you will get different results
from running os.time({year=2012,month=1,day=1,hour=12,min=0,sec=0})
depending on what time zone you run it in.
2012-09-08 16:08:58 +00:00
henri
f366c0d191 Don't always assume that 'safe=1' was set. Added a check for 'unsafe' in ms08-67 2012-09-08 09:36:25 +00:00
paulino
ed65dd66d3 Removes the script from the "safe" category. 2012-09-07 23:44:58 +00:00
paulino
d7234e2582 Renames http-method-tamper to http-vuln-cve2010-0738 and adds the new version of http-method-tamper.
The new version improves the detection mechanism to cover PHP environments with .htaccess files and adds spidering to locate password protected resources automatically.
2012-09-07 23:42:39 +00:00
dmiller
00e37443ed Update @output luadoc on ssl-date 2012-09-07 16:39:02 +00:00
dmiller
a456186e77 Keep delta readable in Normal output
per http://seclists.org/nmap-dev/2012/q3/756
2012-09-07 16:37:47 +00:00
dmiller
b8604e066c ssl-date date formatting issues
Fix date format string to format as UTC (prepend "!") instead of local
time. Also changed "offset" xmloutput elem to "delta" to match http-date
2012-09-07 15:18:33 +00:00
robert
1a726ba337 Updated hashes to include PHP 5.3.15, 5.3.16, 5.4.5 and 5.4.6. 2012-09-07 10:03:05 +00:00
david
5ab8e37be6 Recognize WSAEADDRINUSE in handle_connect_result.
This happens on Windows when two sockets bind to the same local port and
connect to the same remote port on a remote host. I tried this on Linux;
Linux prevents the second bind from succeeding.

http://seclists.org/nmap-dev/2012/q2/513
2012-09-06 20:11:08 +00:00
david
66c296e27f Use socket_strerror in Nsock callback traces.
Otherwise WinSock error numbers are not understood; you get "Unknown
error" instead of "Only one usage of each socket address
(protocol/network address/port) is normally permitted." for example.
2012-09-06 20:11:04 +00:00
david
3ae9ba63be Make sockets temporarily blocking in ncat_send and ncat_broadcast.
It is possible to send so quickly that we start getting EAGAIN on sends.
In listen mode, this means that some sends can get lost. This patch,
adapted from one by Alex Weber, makes sockets blocking for the duration
of the send. This is not as nice as retrying the send through an event
mechanism, but should at least be correct.

http://seclists.org/nmap-dev/2012/q3/670

Compare a similar patch in r13552, which applied to --exec mode.
2012-09-06 18:17:27 +00:00
david
39f2e06d42 Return size, not 0, in ncat_broadcast when o.recvonly is true.
This is what ncat_send does.
2012-09-06 18:17:21 +00:00
henri
f35cf8b93a Fixed indentation. 2012-09-05 20:55:42 +00:00
henri
902000afad Report an error instead of crashing when pipeline_go() returns nil. 2012-09-05 20:55:04 +00:00
henri
db4b8dc603 Added an extra level of indirection to let the compiler properly expand the macro.
See: http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
2012-09-03 13:39:43 +00:00
david
832f815d33 Use smartly chosen destination ports instead of o.magic_port in -sO.
Using o.magic_port, which is usually used for our source address, or
otherwise is somewhat randomly generated, doesn't make sense here.
Instead, use the same destination ports that we use for host discovery:
80 for TCP and SCTP, and 40125 for UDP.

http://seclists.org/nmap-dev/2012/q3/663
2012-09-02 22:47:45 +00:00
david
f3feb4ec39 Define integer DEFAULT_{TCP,UDP,SCTP}_PROBE_PORT.
These are used to derive the strings
DEFAULT_{TCP,UDP,SCTP}_PROBE_PORT_SPEC.
2012-09-02 22:47:30 +00:00
david
640714f63d Use a more sophisticated configure check for epoll.
This is from the GNU Autoconf archive.

http://www.gnu.org/software/autoconf-archive/ax_have_epoll.html

http://seclists.org/nmap-dev/2012/q3/598
http://seclists.org/nmap-dev/2012/q3/657
2012-09-02 22:47:09 +00:00
patrik
b8ce3d3274 Removed debug print statement 2012-09-02 22:45:16 +00:00
david
f7873c0089 Resolve strict-aliasing problems in ip6_ntop.
addr-util.c:191:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
2012-09-01 03:29:39 +00:00
david
3b55096ab4 Index nmap.list_intefaces return value from 1, not 0. 2012-09-01 03:19:00 +00:00
patrik
f9e457ec7c nse-check-globals cleanup 2012-08-31 15:22:29 +00:00
patrik
13411ab6d1 Fixed a bunch of errors related to inproper responses from webservers. 2012-08-31 15:17:14 +00:00
patrik
b14a8518a3 replaced try/catch with silent failure 2012-08-31 14:59:25 +00:00
dmiller
e5129cf8bf Update ip-geolocation-geobytes for structured output
Also fixed error handling as reported here:
http://seclists.org/nmap-dev/2012/q3/693
2012-08-31 11:46:44 +00:00
aca
c13d7c719a Added msrpc-enum script and msrpc lua changes 2012-08-31 10:00:54 +00:00
dmiller
9c199916b8 ssl-known-key: return if sslcert fails 2012-08-30 23:29:06 +00:00
patrik
fe25ec912f fixed bug that would result in a crash when the browser service would return
an empty result.
2012-08-30 18:39:49 +00:00
patrik
0a0db9f835 Fixed library bug, failing to return _ENV; 2012-08-29 19:11:04 +00:00
david
1b93346162 Update condvar doc example to match r29695. 2012-08-29 10:22:17 +00:00
patrik
6c97e0721d nse-check-globals cleanup 2012-08-29 05:42:27 +00:00
patrik
448bb5a71b fixed a bug in a loop where the script would wait for a condition that was
supposed to be signalled by other threads which were no longer running.
2012-08-29 05:37:56 +00:00
dmiller
c71478d91f Fix interfaces bug in broadcast-listener
Reported here: http://seclists.org/nmap-dev/2012/q3/672
2012-08-28 23:07:28 +00:00
david
c5d3bf247b Add CPE for Minix services. 2012-08-28 14:30:20 +00:00
david
3931741c1d Fix format string errors in Ncat logging functions. 2012-08-28 14:30:08 +00:00
david
13c19f637e Add noreturn and format annotations for Ncat logging functions. 2012-08-28 14:29:49 +00:00
david
f9867163da Use bye in place of fatal. 2012-08-28 14:29:37 +00:00
david
f45f2f394e Ignore supposed replies with nonsense pingseq/tryno.
If we get a reply that doesn't pass the simple comparison using the
current value of USI->seqmask, then ignore it. Previously we emitted the
message "Bad Sequence number from host %s.\n" and allowed the reply to
match any probe. This only matters when using -g because otherwise we
encode that information in the source port. I think we have addressed
what was mentioned in the TODO comment in r15986. Allowing promiscuous
matching, as was done before, causes the same spurious closed port issue
that was addressed in r29686.
2012-08-28 14:29:23 +00:00
david
725692b744 Use an unsigned int for --max-retries and related values. 2012-08-28 14:29:11 +00:00
david
dac93e76b3 CHANGELOG for increasing base port numbers. 2012-08-28 13:08:05 +00:00
david
39f42ef6d9 Increase the base source port number on each run of ultra_scan.
Per-probe tryno and pingseq are encoded as offset from a the base source
port number. Previously this was fixed for all calls of ultra_scan,
which means that unrelated probes in different calls would use the same
source port number if they had the same tryno and pingseq. This could
cause erroneous results if a reply to a probe from a previous call was
delated and was received in the current call and interpreted as a legit
response.

This has no effect when o.magic_port_set is true (i.e., when -g or
--source-port is used).

http://seclists.org/nmap-dev/2012/q1/62
http://seclists.org/nmap-dev/2012/q3/589
2012-08-28 13:07:54 +00:00
david
5d809a2476 Call it base_portno instead of magic_portno. 2012-08-28 13:07:41 +00:00
david
107e878cbc Comment NmapOps::magic_port. 2012-08-28 13:07:30 +00:00
david
4357a97403 Make magic_port_set a bool. 2012-08-28 13:07:19 +00:00
david
676de05f7f Provide a default {} value for script categories.
This is so I don't have to write
  categories = {}
when writing test scripts.
2012-08-28 12:17:36 +00:00
david
fdac9750a1 No longer require the "description" field in scripts.
This is so I don't have to do
  description = ""
when writing test scripts.
2012-08-28 12:17:27 +00:00