1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00
Commit Graph

21 Commits

Author SHA1 Message Date
dmiller
a0f55317f3 Fix inclusion of Lua headers. See #1355
We will need to do something similar for Ncat.
2018-10-16 05:18:31 +00:00
batrick
7f5ec526fe Merge branch 'nse-lua53'
Lua 5.3 adds several awesome features of particular interest to nmap including
bitwise operators and integers, a utf8 library, and standard binary pack/unpack
functions.

In addition to adding Lua 5.3, this branch changes:

o Complete removal of the NSE bit library (in C), It has been replaced with
  a new Lua library wrapping Lua 5.3's bit-wise operators.

o Complete removal of the NSE bin library (in C). It has been replaced with a
  new Lua library wrapping Lua 5.3's string.pack|unpack functions.

o The bin.pack "B" format specifier (which has never worked correctly) is
  unimplemented.  All scripts/libraries which use it have been updated. Most
  usage of this option was to allow string based bit-wise operations which are no
  longer necessary now that Lua 5.3 provides integers and bit-wise operators.

o The base32/base64 libraries have been reimplemented using Lua 5.3's new
  bitwise operators. (This library was the main user of the bin.pack "B" format
  specifier.)

o A new "bits" library has been added for common bit hacks. Currently only has
  a reverse function.

Thanks to David Fifield, Daniel Miller, Jacek Wielemborek, and  Paulino
Calderon for testing this branch.
2016-07-02 17:02:27 +00:00
jay
f5e438b966 Got rid of (unnecessary) spaces in blank lines in *.cc and *.h files.
sed -i 's/^\s*$//'
2014-06-19 11:36:10 +00:00
d33tah
421176fc00 Get rid of double newline at the EOF I accidentally introduced in the
last commit.
2014-06-18 11:30:02 +00:00
d33tah
4816358475 Replace all tab characters at the beginnings of lines with 8 spaces.
Mixed indentation annoyed my vim.
2014-01-05 19:14:26 +00:00
david
86077ed05f Don't strdup (and fail to free) pattern passed to pcre_compile.
http://seclists.org/nmap-dev/2012/q2/627
2012-06-05 21:09:01 +00:00
batrick
000f6dc4d9 Lua 5.2 upgrade [1] for NSE.
[1] http://seclists.org/nmap-dev/2012/q2/34
2012-05-27 08:53:32 +00:00
david
e801b1b341 Fix a memory leak in nse_pcrelib.cc. A string was being copied with
strdup before being handed to lua_pushstring. That was excessive because
lua_pushstring already makes its own internal copy of the string. This
was found by Coverity.
2009-07-23 02:59:57 +00:00
batrick
07cfc5aee4 Corrected many #includes for header files (where they are included).
Moved the includes for Lua headers to the .cc files so they are
not needlessly, repeatedly included.

Similarly, moved some standard headers to the .cc files and reorganized
includes to be uniform for all nse_* source files.

Fixed whitespace (removed tabs).
2009-03-10 05:56:10 +00:00
batrick
1d539a2b1c Removed old unused procedure. 2008-09-03 22:16:59 +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
425d6afdab Adding more PCRE option flags to the list returned by the NSE pcre.flags() function. This is up-to-date as of PCRE 7.6 2008-04-06 00:01:33 +00:00
fyodor
5e7b09d6c4 adjust pcre/pcre.h fix so it actually works. needs to be below a header which includes config.h 2007-11-28 18:46:17 +00:00
fyodor
5e7f606ea5 better detection and support for systems which use pcre/pcre.h rather than just pcre.h. Bug reported by Lionel Cons 2007-11-27 19:33:08 +00:00
david
aeb9cae04b Redo some changes to the NSE pcre module that were originally done
before pcre was made a C module. Remove the nse_pcrelib.vcproj file,
change snprintf to Snprintf, and add a typecast to avoid a warning on
Windows.  This and r6026 should be considered a unit.
2007-10-23 01:10:46 +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
78f15a7f65 make pcre an NSE C module 2007-08-11 06:05:48 +00:00
fyodor
a09a6e2007 merge soc07 r4994:5001 - Adding <portused> element for the open TCP port used when performing OS Detection. Only closed TCP and UDP were being printed; I guess it was just an oversight; Call endTask() in process_mainloop() in nse_main.cc so task ending information (like the <taskend> element) are printed; old_locale is allocated on the STACK not the HEAP; NULL is NOT a valid PCRE pointer. 2007-08-11 04:42:31 +00:00
fyodor
cb8101dbcc merge soc07 r4821 - fix nse build system issues 2007-08-11 03:35:12 +00:00
kris
2d8da28206 Remove Lmalloc() from nse_pcrelib.cc and change the only call to it to safe_malloc(). I noticed this when I was doing r4515 but wanted to check it a little further; Lmalloc() calls safe_malloc(), and then tests the returned mem == NULL and returns the mem, but this will never happen because safe_malloc() dies if the mem is NULL. 2007-02-25 15:59:32 +00:00
fyodor
b361685be8 NSE committed 2006-12-11 00:34:26 +00:00