1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 14:11:29 +00:00
Commit Graph

42 Commits

Author SHA1 Message Date
batrick
984bdf65bb Added error message to output for NSE when a script could not be loaded.
See: http://seclists.org/nmap-dev/2008/q3/0265.html
2008-08-07 12:32:39 +00:00
batrick
6bfd95743f Fixed an incorrect number of arguments being passed to a vararg error function. 2008-08-05 09:29:15 +00:00
pgpickering
3398e1f94e modified nse_init.cc, added binlib and hashlib to NSE 2008-07-31 14:21:28 +00:00
batrick
f8059d931e [NSE] Added an error check for loading a file. 2008-07-31 07:30:39 +00:00
batrick
b0a62d2aca Applied Jah's patch to fix --script-updatedb use of an old index for the
script table.

http://seclists.org/nmap-dev/2008/q3/0164.html
2008-07-27 02:55:31 +00:00
batrick
f9e6d7d01a Adapted current nse_main to use the new action closure change discussed here:
(http://seclists.org/nmap-dev/2008/q2/0549.html).
2008-07-07 17:34:37 +00:00
batrick
f424fd21b2 Updated some macros to clean up code. Moved
porttests and hosttests to Lua's registry where they belong.
2008-07-07 17:33:36 +00:00
batrick
8fa740fe04 [NSE] Script Categories are now case insensitive. 2008-07-07 17:32:34 +00:00
batrick
3ae4bcfa9e Removed nse_string. Equivalent procedures are placed in
nse_main and nse_nsock. nse_main now uses Lua to create printable output
while a cleaner hexify procedure has been placed in nsock.
nse_string is removed as a result.
2008-07-07 17:31:38 +00:00
batrick
d34f06ea49 Fixed a compile error. 2008-06-21 13:33:53 +00:00
batrick
ac52d97c25 Updated library handling in nse_init, and made
nmap library properly return its library table.
2008-06-21 13:28:03 +00:00
kris
a5bf21e5db o The NSE nmap.registry.args table is now available, albeit empty, when
--script-args isn't used.  Now scripts don't need to check if it's nil
  before attempting to index it. [Kris]
2008-06-01 06:31:50 +00:00
batrick
d0bc640db8 Large recode of nse_init.cc
Now does most of it's work through Lua:

From Nmap-dev: "Many of the changes consist of changing how Nmap interfaces
with Lua that were sometimes awkward or inflexible. Most of the functions 
have been made to be callable directly by Lua which offers many technical
advantages: stack management is alleviated, errors are handled cleanly and
are more descriptive, and there is increased reusability."

Additionally:
   -- Moved all lua_State * symbols from "l" to "L". This is to maintain
      consistency with other Lua libraries (convention) and to make our macros portable.
   -- Moved file system manipulation over to nse_fs.cc (from nse_init.cc)
2008-05-31 02:39:27 +00:00
batrick
742ff67100 Removed nse_auxiliar. Updated Script Argument parsing. Fixed typos in
documentation. Improved MySQLinfo.nse. Nsock/dnet metatabels are now
protected.
2008-05-31 02:19:24 +00:00
kris
c7eb8011d9 NSE now has a "default" category for scripts. This category holds the set
of scripts chosen from when using -sC (but it's still just another category
and so can be chosen with --script like any other).

On top of updating the docs with information about this new category, I've
also updated sections to emphasize that the "default" category, -sC and -A
are considered intrusive and should not be run against target networks
without permission.

The new list is very similar to the previous "safe,intrusive" list:

Added: finger, ircServerInfo, RealVNC_auth_bypass
Removed: HTTPpasswd

Here are the 21 scripts in this new category:

anonFTP
dns-test-open-recursion
finger
ftpbounce
HTTPAuth
HTTP_open_proxy
ircServerInfo
MSSQLm
MySQLinfo
nbstat
RealVNC_auth_bypass
robots
rpcinfo
showHTMLTitle
showOwner
SMTPcommands
SNMPsysdesr
SSHv1-support
SSLv2-support
UPnP-info
zoneTrans
2008-05-28 07:16:32 +00:00
diman
cf4c7081e8 moving debugger to nmap-exp/diman until further notice 2008-02-03 21:38:38 +00:00
diman
2d9bc1b43d added a CLI debugger 2008-02-03 14:21:36 +00:00
doug
be2ddcfa1c Fix for this TODO item:
o Fix cases of std::string() being used in ways which wrongly parse
  the data for escape sequences such as \n.  For an example, see
  log message of r6474 in svn.

(note that this was a Lua escaping bug, not std::string)
2008-01-28 00:12:37 +00:00
fyodor
09512ff092 o Fix a bunch of warning/error messages which contained an extra
newline.  Thanks to Brandon Enright for the patch.
2007-12-21 03:38:04 +00:00
david
29109de637 Consider Windows paths starting with \ absolute when used with the --script option. 2007-12-14 08:33:31 +00:00
david
82abfd3e1b Insert a path separator in returned paths in init_scandir when WIN32 is defined in nse_init.cc. The Windows code was inserting a separator to find files (e.g. globbing on "%s\*") but was not inserting the separator in returned paths. A symptom of this was scanning with --script=scripts and seeing error messages about not being able to access things like "C:\Nmap\scriptsanonFTP.nse" (should be "C:\Nmap\scripts\anonFTP.nse"). 2007-12-09 05:33:59 +00:00
david
b0d224e0da Make the message printed when using an absolute path look like the other NSE
debugging messages.
2007-12-09 04:52:42 +00:00
david
bc24f8d6c4 Look first for absolute file names in when loading NSE scripts. 2007-12-09 04:42:48 +00:00
david
5f460f8590 Fix typo in nse_init.cc: explicitely -> explicitly. 2007-12-08 22:28:07 +00:00
kris
d05555e8a2 don't require a ".nse" extension when specifying script names with --script 2007-11-29 23:11:48 +00:00
diman
c0f07c99ac adding nselib nselib-bin second (should work on unix now) 2007-11-27 22:18:59 +00:00
david
83382600f2 Revert r5485. This changes the pcre Lua module back to statically linked
code instead of a dynamically loaded C module. Linking the dynamic
shared module with the static libpcre.a was failing on OpenBSD. See
http://seclists.org/nmap-dev/2007/q4/0085.html.
2007-10-23 00:45:00 +00:00
fyodor
ba545c1ef9 Unix installation now places NSELib dynamic libraries in 'libexec' rather than 'share' directories, since they are architecture dependent. Thanks to Christoph J. Thompson for the patch. 2007-10-07 21:32:38 +00:00
kris
7c3448c1f7 Trying to keep script.db tidy when running --script-updatedb. This sorts the script filenames before writing script.db. Tested on Linux and Windows 2007-09-15 01:01:35 +00:00
stoiko
4767dd8c70 script arguments now get checked before nmap starts scanning 2007-08-20 21:56:36 +00:00
fyodor
c124e918b7 merge soc07 r5360:5367 - Merge Majek's raw packet NSE patch 2007-08-11 06:13:25 +00:00
fyodor
62d7e3ed87 merge soc07 r5317:5322 - NSE buffered receives and script arguments 2007-08-11 06:09:50 +00:00
fyodor
78f15a7f65 make pcre an NSE C module 2007-08-11 06:05:48 +00:00
fyodor
01b5a155e1 merge soc07 r5063:5065 - added support for nse-C-modules under windows; misc. nse improvements 2007-08-11 04:59:14 +00:00
fyodor
40d3cd5e37 merge soc07 r5048 - added nse_bitlib.cc/.h again - because compilation was broken on windows through the c-module support 2007-08-11 04:55:50 +00:00
fyodor
80ade54171 merge soc07 r5016:5022 - Added support for C-modules; converted the nse_bitlib to such a module; adapted dns-test-open-recursion.nse to use the new module; Moved make_buffer to stdnse and updated the documentation 2007-08-11 04:49:25 +00:00
fyodor
2479d5d1d9 merge soc07 r4915 - Use path_get_basename in init_updatedb 2007-08-11 04:20:04 +00:00
fyodor
88b0e212df merge soc07 r4906 - NSE bugfixes 2007-08-11 04:16:56 +00:00
fyodor
cafec3593d merge soc07 r4891 - nse improvements 2007-08-11 04:12:45 +00:00
fyodor
cb8101dbcc merge soc07 r4821 - fix nse build system issues 2007-08-11 03:35:12 +00:00
diman
3543208670 Fixed file and directory retrieval problems under windows 2006-12-29 00:44:49 +00:00
fyodor
b361685be8 NSE committed 2006-12-11 00:34:26 +00:00