!31 add pcre2 support
From: @XWwalker Reviewed-by: @gebidelidaye Signed-off-by: @gebidelidaye
This commit is contained in:
commit
c7556dea95
80
backport-remove-nse_pcrelib-from-build.patch
Normal file
80
backport-remove-nse_pcrelib-from-build.patch
Normal file
@ -0,0 +1,80 @@
|
||||
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
|
||||
---
|
||||
Makefile.in | 6 +++---
|
||||
mswin32/nmap.vcxproj | 2 --
|
||||
nse_main.cc | 2 --
|
||||
nse_main.lua | 2 +-
|
||||
nselib/unittest.lua | 1 -
|
||||
5 files changed, 4 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index ccfceda..8c19056 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -88,9 +88,9 @@ UNINSTALLNDIFF=@UNINSTALLNDIFF@
|
||||
UNINSTALLNPING=@UNINSTALLNPING@
|
||||
|
||||
ifneq (@NOLUA@,yes)
|
||||
-NSE_SRC=nse_main.cc nse_utility.cc nse_nsock.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_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_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_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_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_dnet.o nse_fs.o nse_nmaplib.o nse_debug.o nse_lpeg.o
|
||||
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
|
||||
index 110291f..b946c7c 100644
|
||||
--- a/nse_main.cc
|
||||
+++ b/nse_main.cc
|
||||
@@ -14,7 +14,6 @@
|
||||
#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"
|
||||
@@ -557,7 +556,6 @@ static int panic (lua_State *L)
|
||||
static void set_nmap_libraries (lua_State *L)
|
||||
{
|
||||
static const luaL_Reg libs[] = {
|
||||
- {NSE_PCRELIBNAME, luaopen_pcrelib},
|
||||
{NSE_NMAPLIBNAME, luaopen_nmap},
|
||||
{LFSLIBNAME, luaopen_lfs},
|
||||
{LPEGLIBNAME, luaopen_lpeg},
|
||||
diff --git a/nse_main.lua b/nse_main.lua
|
||||
index af5f611..7fba46e 100644
|
||||
--- a/nse_main.lua
|
||||
+++ b/nse_main.lua
|
||||
@@ -285,7 +285,7 @@ local REQUIRE_ERROR = {};
|
||||
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
|
||||
index ac90c31..d780b85 100644
|
||||
--- a/nselib/unittest.lua
|
||||
+++ b/nselib/unittest.lua
|
||||
@@ -107,7 +107,6 @@ local libs = {
|
||||
"ospf",
|
||||
"outlib",
|
||||
"packet",
|
||||
-"pcre",
|
||||
"pgsql",
|
||||
"pop3",
|
||||
"pppoe",
|
||||
--
|
||||
2.33.0
|
||||
|
||||
1336
backport-upgrade-libpcre-to-PCRE2-10.42.patch
Normal file
1336
backport-upgrade-libpcre-to-PCRE2-10.42.patch
Normal file
File diff suppressed because it is too large
Load Diff
18
nmap.spec
18
nmap.spec
@ -3,22 +3,24 @@
|
||||
Name: nmap
|
||||
Epoch: 2
|
||||
Version: 7.92
|
||||
Release: 4
|
||||
Release: 5
|
||||
License: Nmap
|
||||
Summary: A tool for network discovery and security auditing.
|
||||
Requires: %{name}-ncat = %{epoch}:%{version}-%{release}
|
||||
URL: https://nmap.org/
|
||||
Source0: https://nmap.org/dist/%{name}-%{version}.tar.bz2
|
||||
BuildRequires: automake autoconf gcc-c++ gettext-devel libpcap-devel libssh2-devel
|
||||
BuildRequires: libtool lua-devel openssl-devel
|
||||
BuildRequires: libtool lua-devel openssl-devel pcre2-devel
|
||||
|
||||
Obsoletes: nmap-frontend nmap-ndiff nmap-ncat nc < 1.109.20120711-2
|
||||
Obsoletes: nc6 < 1.00-22
|
||||
Provides: nmap-frontend nmap-ndiff nmap-ncat nc nc6
|
||||
|
||||
Patch0001: backport-nmap-4.03-mktemp.patch
|
||||
Patch0002: backport-nmap_resolve_config.patch
|
||||
Patch0003: nmap-replace-sensitive-words.patch
|
||||
Patch0001: backport-nmap-4.03-mktemp.patch
|
||||
Patch0002: backport-nmap_resolve_config.patch
|
||||
Patch0003: nmap-replace-sensitive-words.patch
|
||||
Patch0004: backport-upgrade-libpcre-to-PCRE2-10.42.patch
|
||||
Patch0005: backport-remove-nse_pcrelib-from-build.patch
|
||||
|
||||
%define pixmap_srcdir zenmap/share/pixmaps
|
||||
|
||||
@ -66,6 +68,12 @@ ln -s ncat %{buildroot}%{_bindir}/nc
|
||||
%{_mandir}/man1/*.1.gz
|
||||
|
||||
%changelog
|
||||
* Thu Jul 06 2023 xingwei <xingwei14@h-partners.com> - 2:7.92-5
|
||||
- Type:bugfix
|
||||
- CVE:
|
||||
- SUG:NA
|
||||
- DESC:add pcre2 support
|
||||
|
||||
* Mon May 29 2023 xingwei <xingwei14@h-partners.com> - 2:7.92-4
|
||||
- Type:bugfix
|
||||
- CVE:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user