2023-07-06 03:48:45 +00:00
|
|
|
From d131a096a869195be36ef7d4fa36739373346cb2 Mon Sep 17 00:00:00 2001
|
|
|
|
|
From: dmiller <dmiller@e0a8ed71-7df4-0310-8962-fdc924857419>
|
|
|
|
|
Date: Sat, 24 Jun 2023 01:53:09 +0000
|
|
|
|
|
Subject: [PATCH] Remove nse_pcrelib from build.
|
|
|
|
|
|
|
|
|
|
Conflict: NA
|
|
|
|
|
Reference: https://github.com/nmap/nmap/commit/d131a096a869195be36ef7d4fa36739373346cb2
|
|
|
|
|
---
|
2023-07-27 16:21:21 +08:00
|
|
|
Makefile.in | 6 +++---
|
|
|
|
|
nse_main.cc | 2 --
|
|
|
|
|
nse_main.lua | 2 +-
|
|
|
|
|
nselib/unittest.lua | 1 -
|
|
|
|
|
4 files changed, 4 insertions(+), 7 deletions(-)
|
2023-07-06 03:48:45 +00:00
|
|
|
|
|
|
|
|
diff --git a/Makefile.in b/Makefile.in
|
2023-07-27 16:21:21 +08:00
|
|
|
index 2b13e86..a924301 100644
|
2023-07-06 03:48:45 +00:00
|
|
|
--- a/Makefile.in
|
|
|
|
|
+++ b/Makefile.in
|
|
|
|
|
@@ -88,9 +88,9 @@ UNINSTALLNDIFF=@UNINSTALLNDIFF@
|
|
|
|
|
UNINSTALLNPING=@UNINSTALLNPING@
|
|
|
|
|
|
|
|
|
|
ifneq (@NOLUA@,yes)
|
2023-07-27 16:21:21 +08:00
|
|
|
-NSE_SRC=nse_main.cc nse_utility.cc nse_nsock.cc nse_db.cc nse_dnet.cc nse_fs.cc nse_nmaplib.cc nse_debug.cc nse_pcrelib.cc nse_lpeg.cc
|
|
|
|
|
-NSE_HDRS=nse_main.h nse_utility.h nse_nsock.h nse_db.h nse_dnet.h nse_fs.h nse_nmaplib.h nse_debug.h nse_pcrelib.h nse_lpeg.h
|
|
|
|
|
-NSE_OBJS=nse_main.o nse_utility.o nse_nsock.o nse_db.o nse_dnet.o nse_fs.o nse_nmaplib.o nse_debug.o nse_pcrelib.o nse_lpeg.o
|
|
|
|
|
+NSE_SRC=nse_main.cc nse_utility.cc nse_nsock.cc nse_db.cc nse_dnet.cc nse_fs.cc nse_nmaplib.cc nse_debug.cc nse_lpeg.cc
|
|
|
|
|
+NSE_HDRS=nse_main.h nse_utility.h nse_nsock.h nse_db.h nse_dnet.h nse_fs.h nse_nmaplib.h nse_debug.h nse_lpeg.h
|
|
|
|
|
+NSE_OBJS=nse_main.o nse_utility.o nse_nsock.o nse_db.o nse_dnet.o nse_fs.o nse_nmaplib.o nse_debug.o nse_lpeg.o
|
2023-07-06 03:48:45 +00:00
|
|
|
ifneq (@OPENSSL_LIBS@,)
|
|
|
|
|
NSE_SRC+=nse_openssl.cc nse_ssl_cert.cc
|
|
|
|
|
NSE_HDRS+=nse_openssl.h nse_ssl_cert.h
|
|
|
|
|
diff --git a/nse_main.cc b/nse_main.cc
|
2023-07-27 16:21:21 +08:00
|
|
|
index d5d460e..2382688 100644
|
2023-07-06 03:48:45 +00:00
|
|
|
--- a/nse_main.cc
|
|
|
|
|
+++ b/nse_main.cc
|
2023-07-27 16:21:21 +08:00
|
|
|
@@ -15,7 +15,6 @@
|
2023-07-06 03:48:45 +00:00
|
|
|
#include "nse_fs.h"
|
|
|
|
|
#include "nse_nsock.h"
|
|
|
|
|
#include "nse_nmaplib.h"
|
|
|
|
|
-#include "nse_pcrelib.h"
|
|
|
|
|
#include "nse_openssl.h"
|
|
|
|
|
#include "nse_debug.h"
|
|
|
|
|
#include "nse_lpeg.h"
|
2023-07-27 16:21:21 +08:00
|
|
|
@@ -562,7 +561,6 @@ static int panic (lua_State *L)
|
2023-07-06 03:48:45 +00:00
|
|
|
static void set_nmap_libraries (lua_State *L)
|
|
|
|
|
{
|
|
|
|
|
static const luaL_Reg libs[] = {
|
|
|
|
|
- {NSE_PCRELIBNAME, luaopen_pcrelib},
|
|
|
|
|
{NSE_NMAPLIBNAME, luaopen_nmap},
|
2023-07-27 16:21:21 +08:00
|
|
|
{NSE_DBLIBNAME, luaopen_db},
|
2023-07-06 03:48:45 +00:00
|
|
|
{LFSLIBNAME, luaopen_lfs},
|
|
|
|
|
diff --git a/nse_main.lua b/nse_main.lua
|
2023-07-27 16:21:21 +08:00
|
|
|
index 24c9d2a..596aba9 100644
|
2023-07-06 03:48:45 +00:00
|
|
|
--- a/nse_main.lua
|
|
|
|
|
+++ b/nse_main.lua
|
2023-07-27 16:21:21 +08:00
|
|
|
@@ -292,7 +292,7 @@ local REQUIRE_ERROR = {};
|
2023-07-06 03:48:45 +00:00
|
|
|
rawset(stdnse, "silent_require", function (...)
|
|
|
|
|
local status, mod = pcall(require, ...);
|
|
|
|
|
if not status then
|
|
|
|
|
- print_debug(1, "%s", traceback(mod));
|
|
|
|
|
+ print_debug(2, "%s", traceback(mod));
|
|
|
|
|
error(REQUIRE_ERROR)
|
|
|
|
|
else
|
|
|
|
|
return mod;
|
|
|
|
|
diff --git a/nselib/unittest.lua b/nselib/unittest.lua
|
2023-07-27 16:21:21 +08:00
|
|
|
index b22de05..aaf5fce 100644
|
2023-07-06 03:48:45 +00:00
|
|
|
--- a/nselib/unittest.lua
|
|
|
|
|
+++ b/nselib/unittest.lua
|
|
|
|
|
@@ -107,7 +107,6 @@ local libs = {
|
|
|
|
|
"ospf",
|
|
|
|
|
"outlib",
|
|
|
|
|
"packet",
|
|
|
|
|
-"pcre",
|
|
|
|
|
"pgsql",
|
|
|
|
|
"pop3",
|
|
|
|
|
"pppoe",
|