1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 04:09:01 +00:00
Commit Graph

3106 Commits

Author SHA1 Message Date
batrick
cadc08047f [NSE] Add the filename and runlevel globals to scripts when loaded via
Script.new. Because of the new strict.lua library being added, scripts
would look for the absent filename global at load-time and fail due to an
error (ssh-hostkey.nse).
2009-07-21 22:21:48 +00:00
fyodor
80c7b8af1b TODO updates after chat w/David 2009-07-21 21:29:04 +00:00
fyodor
e6490b856b Add an ncat idea which is worth thinking about but may or may not be worth implementing 2009-07-21 20:16:08 +00:00
david
264c3e2302 Slightly expand an OS fingerprint based on a followup report. 2009-07-21 14:01:15 +00:00
david
9cb6dd338d Use logical rather than bitwise or in NmapOps::RawScan to avoid a compiler
warning about mixing int and bool types.
2009-07-20 23:06:26 +00:00
david
a88bda3d78 Make it a warning, not a fatal error, when we can't get the hardware address
for an interface, and skip the interface. The warning looks like

Warning: Unable to get hardware address for interface %s -- skipping it.

This happens when a FireWire interface (fw*) has an address configured on Mac
OS X. Previously Nmap would die in getinterfaces so it wasn't even possible to
scan over the other interfaces.
2009-07-20 18:59:58 +00:00
david
00ae29389a Remove an unused variable from scan_engine.cc. 2009-07-20 15:35:52 +00:00
fyodor
1736dde56c Applied patch:
o Fixed a log_write call and a pfatal call to use a syntax which is
  safer from format strings bugs.  This allows Nmap to build with the
  gcc -Wformat -Werror=format-security options. [Guillaume Rousse]
2009-07-19 07:23:32 +00:00
fyodor
e4c5e1e6d4 generate latest nmap-mac-prefix from 7/18/09 IEEE oui.txt 2009-07-19 06:26:07 +00:00
david
d6c9e19a2c Add -Pn and -sn synonyms for -PN and -sP respectively. 2009-07-19 05:13:07 +00:00
david
82a668c278 Remove the "Linux goofiness" zero-byte write test from scan_engine.cc.
See r14426 in /nsock.
2009-07-19 04:04:32 +00:00
fyodor
935d0677da Added Nmap 5.00 to the CHANGELOG 2009-07-18 22:23:23 +00:00
batrick
59b2c83234 If neither --script nor -sV is present, then do not load NSE. Before, NSE
would load despite script scanning not being activated. See [1] for
preliminary patch from Solar Designer and motivation.

[1] http://seclists.org/nmap-dev/2009/q3/0207.html
2009-07-18 14:56:07 +00:00
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