1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-19 05:59:01 +00:00
Commit Graph

3493 Commits

Author SHA1 Message Date
fyodor
e033940fa1 when the normal 8192-byte write buffer for log_write isn't big enough, we previously jumped it to 1,228,800 bytes. It turns out even that isn't enough in some cases, like the guy who just wrote me that was using '-p1-65535 -d6 -vvv -oA remotehost'. Sheesh. I had another person report the same sort of thing recently. So I'm upping it to 4MB. That ought to be enough for anybody :). On UNIX, vsnprintf is nice enough to tell us how much space we will need and so we don't have to worry about this. I also updated the error message to ask people to report it to nmap-dev rather than to me specifically 2009-07-18 09:53:08 +00:00
david
0746a7a28a Change -sP from "ping scan" to "don't port scan" in the documentation,
while still mentioning that "ping scan" is a common term. Mention the
use of -PN and -sP together to run NSE host scripts without ping and
port scanning.
2009-07-17 23:47:11 +00:00
david
a3391d5401 Remove the prohibition against using -PN and -sP together. This is the
currently recommended way to disable both host discovery and port
scanning. The only other phase that can run in the absence of these two
is NSE, and then with host scripts only. -sP should not by thought of as
"ping scan" but as "don't port scan," because more than a ping scan can
happen when you use it. More reasonable and mnemonic options for
disabling these phases will be forthcoming.
2009-07-17 23:46:14 +00:00
david
35d74be01d Remove a constant printf string substitution. 2009-07-17 23:43:37 +00:00
david
2b8d091252 Include traceroute in NmapOps::RawScan. 2009-07-17 23:41:08 +00:00
jah
dcfa102a1b Fix the indexing of Globals - found with the help of strict.lua and Patrick's
check_globals script.

Commented-out two functions which are currently unused:
svcctl_Type_tostr() and svcctl_State_tostr()
and which call currently unavailable functions:
svcctl_Type_str() and svcctl_State_str()

(see http://seclists.org/nmap-dev/2009/q3/0194.html )
2009-07-17 22:38:26 +00:00
jah
5a18633b33 Fix the indexing of Globals - found with the help of strict.lua 2009-07-17 22:34:27 +00:00
ron
1b2392f73d Fixed an undeclared variable bug in a currently-unused codepath. 2009-07-17 21:56:11 +00:00
jah
d0b41b5cfc Fix the indexing of Globals - found with the help of strict.lua 2009-07-17 21:09:00 +00:00
david
5c33e639ae Using --scan-delay always implies a parallelism of 1. Change the fatal
error

You can't use --max-parallelism with --scan-delay.
QUITTING!

to a warning

Warning: --min-parallelism and --max-parallelism are ignored with --scan-delay.
2009-07-17 20:06:05 +00:00
david
3a4a181f2d Remove extraports state inference from Ndiff. This was a feature that,
if there was only one extraports state, would create a Port object for
each scanned port that was not listed explictly. So for example, if a
scan of 100 ports had 5 open ports and an extraports of "filtered",
Ndiff would create 95 port records in the "filtered" state in addition
to the 5 "open". If there was more than one extraports state this was
not possible.

This turned out to be a slow operation, out of all proportion to its
utility. Here are times for a diff of random-1.xml and random-2.xml,
before and after:

real    0m11.912s
user    0m10.970s
sys     0m0.249s

real    0m0.773s
user    0m0.726s
sys     0m0.046s

In most cases extraports are not shown in the output, so this was wasted
effort. I know of only one place where it affected the output, when an
extraports in the A scan because a non-extraports in a different state
in the B scan. Then the previous state would be included in the <a>
port, where now it will just be listed without a state.
2009-07-17 19:46:41 +00:00
david
d8925b3c11 Rename the o.pingscan variable to o.noportscan to reflect its true
purpose. Make o.listscan imply o.noportscan to simplify some conditions.
2009-07-17 01:02:57 +00:00
david
5bd45a7642 pjl-ready-message.nse: Add more error checking, shorten the output to
one line, and display the previous message also when the message is
changed.
2009-07-16 23:24:42 +00:00
david
ccd54de33c Make some formatting changes in pjl-ready-message.nse. 2009-07-16 23:05:27 +00:00
joao
a14ab3c637 Fixing locals/globals on following scripts
- telnet-brute.nse required a small refactoring to fix the use of a global variable called soc
2009-07-16 22:54:38 +00:00
david
4d9094fb21 o Added the pjl-ready-message.nse script from Aaron Leininger. This
script allows viewing and setting the message displayed by printers
  that support the Printer Job Language.
2009-07-16 22:46:45 +00:00
david
3ce0321e1f Document UDP probe payloads in the Reference Guide. 2009-07-16 22:11:03 +00:00
david
f5ff7da42c Add to CHANGELOG:
o The Ndiff man page was expanded with examples and sample output.
2009-07-16 21:56:08 +00:00
david
163dab3acd Regenerate ndiff.1. 2009-07-16 20:37:02 +00:00
david
b4e3fd762a Add test and XML Ndiff output samples from Fyodor's Facebook scans. 2009-07-16 20:36:53 +00:00
david
1bec7dcc21 Add a "quick start" example section right below the options summary. 2009-07-16 19:42:48 +00:00
david
8ad317c706 Add a description of XML output to the Ndiff man page. Still need to
fill in the output examples.
2009-07-16 19:26:35 +00:00
david
8ed86b8696 Some improvements to the Ndiff man page: a description of text output
and a shell script for daily scanning with cron. Still a work in
progress.
2009-07-16 18:47:58 +00:00
david
0622056f86 Remove some dead code from RPC scan. There was a "tries" variable and
code to increase the scan delay if tries increased too much. But the
main loop did an unconditional continue before incrementing tries, so it
was always 0. I looked back at the history and saw that it was always
like this for RPC scan. tries was only incremented for the other scan
types handled by pos_scan, which now are done by ultra_scan. So I
removed the tries accounting and dependent code.
2009-07-16 04:50:47 +00:00
david
a79ddef79f Made RPC grinding work from service detection again by changing the
looked-for service name from "rpc" to "rpcbind", the name it has in
nmap-service-probes.
2009-07-16 04:29:29 +00:00
batrick
a8891ec0ca If the old _index metamethod does not exist then do not use it. This would
cause "attempt to index a nil value" errors when whatever is being made
"strict" did not have a metatable (the global environment for example).
2009-07-16 03:43:23 +00:00
batrick
0be861959f ssh-hostkey no longer looks for the action global which
may not exist (and thus triggers an error from strict.lua). We instead
setup dummy portrule/action functions, print the debug error for why the script
will not run, and return.
2009-07-16 03:41:36 +00:00
fyodor
fd39bf6970 2009-07-16 03:10:08 +00:00
david
401fa9d2d3 Be more careful about checking address families in hostInExclude.
Before, a variable was set to NULL if it was not AF_INET, and was later
dereferenced in handling target groups containing IPv4 addresses. This
never actually caused a problem because Nmap's -6 switch is global, so
if an AF_INET6 address was passed to hostInExclude, none of the target
groups could have contained IPv4 addresses and the NULL dereference
would not have occurred. It might have broken easily in the future
though. Now the IPv4 target groups make sure they are dealing with an
AF_INET address.
2009-07-16 02:47:44 +00:00
jah
bfa1e3ef9b Added a note that the registry details for Redist package need updating
whenever the Redist package is upgraded.
2009-07-15 22:27:34 +00:00
jah
b1ca97694d Update the uninstall registry key for the upgraded vcredist_x86.exe package
(r13075).
(See http://seclists.org/nmap-dev/2009/q3/0164.html )
2009-07-15 22:04:53 +00:00
joao
4530194599 Fix global to local variables 2009-07-15 21:29:41 +00:00
joao
f0415b5393 Fix global to local variable loc 2009-07-15 21:21:19 +00:00
batrick
04685b77a5 Changed default --max-parallelism for the NSE Nsock library binding to 20
after discussion in the NSE meeting. We are using this value due to machines
on very poor network connections occupying a niche in Nmap's user base.
2009-07-15 15:27:16 +00:00
batrick
ba4e924634 Corrected the NSEDoc formatting and wording. 2009-07-15 15:19:33 +00:00
batrick
9d5de2a9d1 Added strict library for libraries (and scripts). The module function is
replaced so that all NSE modules will have strict declared global checking at
runtime. This should catch most developer errors early. Please see [1] for
further reference into the problem.

[1] http://seclists.org/nmap-dev/2009/q3/0070.html
2009-07-15 15:14:00 +00:00
david
1961eed908 Use CRLF, not just LF, in auth-owners.nse. Send CRLF in the request and
strip it from the response. Previously only LF was stripped from the
response so each user name had a CR at the end of it (invisible in the
terminal).
2009-07-15 14:54:03 +00:00
batrick
67f31fd170 Fixed a global access for 'opts' using check_globals script. 2009-07-15 14:16:14 +00:00
batrick
35f94dcaf3 Removed two functions no longer being used. 2009-07-15 08:53:19 +00:00
david
dab741f30f Make nse_selectedbyname return false if the "NSE_SELECTED_BY_NAME" key
is not in the registry. That function is called indirectly by
nmap.verbosity, which may be called before _R["NSE_SELECTED_BY_NAME"]
has been given a value. I was getting this error with any script scan:

NSE: failed to initialize the script engine:
attempt to call a nil value
stack traceback:
        [C]: in function 'verbosity'
        ./nse_main.lua:136: in function 'print_verbose'
        ./nse_main.lua:680: in main chunk
        [C]: ?

QUITTING!
2009-07-15 02:54:03 +00:00
fyodor
276def3c2e changes from NSE meeting 2009-07-15 01:28:34 +00:00
batrick
01c25ab29e [NSE] Patch to move the call NSE_SELECTED_BY_NAME to nse_main.cc for
improved locality. Other Lua Registry functions called by C were wrapped in
a C API inside nse_main.cc.
2009-07-14 22:41:25 +00:00
fyodor
ad10a7c672 Latest TODO after chat w/David 2009-07-14 22:27:17 +00:00
fyodor
7c4abd869b some reorg 2009-07-14 20:05:41 +00:00
batrick
490c0c3b57 Add destructor for mutex "trylock" case (was forgotten in mutex destructor
patch).
2009-07-14 11:36:39 +00:00
batrick
9dce0cd070 Fixed a compiler warning. 2009-07-14 09:56:09 +00:00
batrick
543af4c57d Increased the default parallelism for NSE to 40. This patch is the result
of testing to determine an ideal default value. A post on nmap-dev will
soon follow further describing the results and motivation.
2009-07-14 05:19:47 +00:00
david
7ce852170b Move format_difftime to after the action function where it belongs. 2009-07-13 22:49:50 +00:00
david
40b0f784e7 Make http-date.nse capable of printing time differences in years. A web
server with a date in 2007 was producing the output

|_ http-date: Sun, 07 Jan 2007 08:17:36 GMT; -918d13h46m40s from local time.

Now it is

|_ http-date: Sun, 07 Jan 2007 09:01:44 GMT; -2y187d13h46m40s from local time.
2009-07-13 22:48:53 +00:00
david
426ed74a8b Add the http-date.nse script. Also the function http.parse_date that
parses an HTTP date in any of three possible formats.

http-date.nse gets the Date: header field value from and HTTP server,
then displays it with how much it differs from local time.
2009-07-13 22:03:02 +00:00