1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-23 16:09:02 +00:00
Commit Graph

8232 Commits

Author SHA1 Message Date
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
david
bc029f9631 Use a stack variable for the main UltraScanInfo. 2012-08-28 12:17:17 +00:00
david
c601f71fc5 More style in idle_scan.cc. 2012-08-28 08:20:31 +00:00
david
d32d538a33 Remove some dead commented code. 2012-08-28 07:50:30 +00:00
david
7baef46e3c Style in idle_scan.{cc,h}.
astyle -a -p -H -s2 -m2 idle_scan.cc idle_scan.h

with manual fixup.
2012-08-28 07:50:09 +00:00
david
7a9e7c502e Add a missing IFF_IPMP #ifdef guard. 2012-08-26 20:44:32 +00:00
kroosec
2f21e49cfb Updated http-drupal-modules documentation. 2012-08-25 17:31:53 +00:00
kroosec
e3db186435 xml output support for http-drupal-modules.nse 2012-08-25 14:02:27 +00:00
kroosec
1f869e32df Fix small type in CHANGELOG 2012-08-25 14:01:44 +00:00
tomsellers
5ba2007d69 Added or enhanced support for the following data types:
SQLTEXT       = 0x23 - text
GUIDTYPE      = 0x24 - uniqueidentifier
NTEXTTYPE     = 0x63 - unicode text (ntext)
BITNTYPE      = 0x68 - boolean
DECIMALNTYPE  = 0x6A - decimal
NUMERICNTYPE  = 0x6C - numeric
FLTNTYPE      = 0x6D - float/real/double
MONEYNTYPE    = 0x6E - money / smallmoeny
BIGBINARYTYPE = 0xAD - binary
BIGCHARTYPE   = 0xAF - char
SQLNCHAR      = 0xEF - unicode char (nchar)

Added detection and handling of null values when processing query responses from the server.
Added DoneProc response token support
Reordered ColumnData and ColumnInfo parsers by data type code to make updates easier.
2012-08-24 10:32:44 +00:00
aca
fd32aec639 Merged http-slowloris-check 2012-08-24 09:19:30 +00:00
dmiller
c3f88169a4 Fix NSE error: attempt to get length of a number
NSE: Script Engine Scan Aborted.
An error was thrown by the engine: attempt to get length of a number
value
stack traceback:
        [C]: in function 'port_set_output'
        /home/rt/builds/nmap/nse_main.lua:314: in function 'set_output'
        /home/rt/builds/nmap/nse_main.lua:947: in function 'run'
        /home/rt/builds/nmap/nse_main.lua:1330: in function
</home/rt/builds/nmap/nse_main.lua:1237>
        [C]: in ?

This now allows return of anything stringifiable as second return value
without crashing (though this may not be what the script author intends,
better to not crash)
2012-08-23 18:45:42 +00:00
patrik
a49667aa02 Reverted bad commit to http-title 2012-08-22 17:11:10 +00:00
jah
0936515cd9 Restored the hyphen character, in get_ips_from_range, to a lua string pattern for ip ranges such as "10.0.0.0 - 10.1.0.0" 2012-08-21 01:16:49 +00:00
david
94959c42e2 Use the -c option in kdesu commands.
This bug was found by Gaetan Bisson.
http://seclists.org/nmap-dev/2012/q3/592.
2012-08-19 20:11:06 +00:00
henri
af2f0960ab Automatically enforce the use of the nsock select engine if we detect that stdin
is a regular file.

Under linux, that provides epoll(7), this allows proper behavior when
redirecting a regular file to stdin (e.g.: 'ncat localhost < file.txt').

Bug was reported by Michal Hlavinka. See
http://seclists.org/nmap-dev/2012/q3/490 for more details.
2012-08-18 16:25:50 +00:00