Re: Nmap Script Engine on OpenWrt
Bruno <[email protected]> Mon, 2 Apr 2018 15:24:28 -0300
| Newsgroups | gmane.comp.security.nmap.devel |
|---|---|
| Message-ID | <[email protected]> |
Thanks Daniel Miller for your prompt answer, I'm attaching the error log. (Not sure if it works for the dev list. If it doesn't I will reply with the error on clear text). Compiling with the "--without-liblua" works flawlessly. On 04/02/2018 02:42 PM, Daniel Miller wrote: > Bruno, > > NSE doesn't make sense outside the context of Nmap, and many of the > libraries it uses are compiled in to nmap itself. However, there > shouldn't be any reason that it wouldn't compile on OpenWrt. Can you > change the package's makefile so that it doesn't use --without-liblua > in configure and then report what actually happens? What are the > specific errors that happen? > > Dan > > On Mon, Apr 2, 2018 at 11:28 AM, Bruno <[email protected] > <mailto:[email protected]>> wrote: > > Is it possible to run NSE scritps, but without the nmap scripting? > > I'm trying to run nmap scripting on OpenWRT, so the router let me > know if there are vulnerabilities on my network to be patched. > However, the nmap version for OpenWRT is missing scripting support > (https://github.com/openwrt/packages/issues/4472 > <https://github.com/openwrt/packages/issues/4472>) > > The scripts are written in lua. So, what I'm planning to do is run > all the scripts available from lua itself. Do I have to rewrite > part of NSE or is there an easy way to do it? Or is there a way to > enable scripting on OpenWRT with liblua? > > Thanks > > > _______________________________________________ > Sent through the dev mailing list > https://nmap.org/mailman/listinfo/dev > <https://nmap.org/mailman/listinfo/dev> > Archived at http://seclists.org/nmap-dev/ > > _______________________________________________ Sent through the dev mailing list https://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
errorNmap.txt
(text/plain, 9.4 KB)
make[3]: Entering directory '/home/bruno/lede/feeds/packages/net/nmap'
rm -f /home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/.built
touch /home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/.built_check
CFLAGS="-Os -pipe -mcpu=cortex-a15 -mfpu=neon-vfpv4 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -iremap/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60:nmap-7.60 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/bruno/lede/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/usr/include -I/home/bruno/lede/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/include -I/home/bruno/lede/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-5.5.0_musl_eabi/usr/include -I/home/bruno/lede/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-5.5.0_musl_eabi/include/fortify -I/home/bruno/lede/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-5.5.0_musl_eabi/include " CXXFLAGS="-Os -pipe -mcpu=cortex-a15 -mfpu=neon-vfpv4 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -iremap/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60:nmap-7.60 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/bruno/lede/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/usr/include -I/home/bruno/lede/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/include -I/home/bruno/lede/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-5.5.0_musl_eabi/usr/include -I/home/bruno/lede/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-5.5.0_musl_eabi/include/fortify -I/home/bruno/lede/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-5.5.0_musl_eabi/include " LDFLAGS="-L/home/bruno/lede/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/usr/lib -L/home/bruno/lede/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/lib -L/home/bruno/lede/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-5.5.0_musl_eabi/usr/lib -L/home/bruno/lede/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-5.5.0_musl_eabi/lib -znow -zrelro " make -j1 -C /home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/. AR="arm-openwrt-linux-muslgnueabi-gcc-ar" AS="arm-openwrt-linux-muslgnueabi-gcc -c -Os -pipe -mcpu=cortex-a15 -mfpu=neon-vfpv4 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -iremap/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60:nmap-7.60 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" LD=arm-openwrt-linux-muslgnueabi-ld NM="arm-openwrt-linux-muslgnueabi-gcc-nm" CC="arm-openwrt-linux-muslgnueabi-gcc" GCC="arm-openwrt-linux-muslgnueabi-gcc" CXX="arm-openwrt-linux-muslgnueabi-g++" RANLIB="arm-openwrt-linux-muslgnueabi-gcc-ranlib" STRIP=arm-openwrt-linux-muslgnueabi-strip OBJCOPY=arm-openwrt-linux-muslgnueabi-objcopy OBJDUMP=arm-openwrt-linux-muslgnueabi-objdump SIZE=arm-openwrt-linux-muslgnueabi-size CROSS="arm-openwrt-linux-muslgnueabi-" ARCH="arm" ;
make[4]: Entering directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60'
Compiling libnetutil
cd libnetutil && make
make[5]: Entering directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/libnetutil'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/libnetutil'
Compiling liblinear
make[5]: Entering directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/liblinear'
make[5]: 'liblinear.a' is up to date.
make[5]: Leaving directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/liblinear'
Compiling libnbase
cd nbase && make
make[5]: Entering directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/nbase'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/nbase'
Compiling libnsock
cd nsock/src && make
make[5]: Entering directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/nsock/src'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/nsock/src'
Compiling libdnet
make[5]: Entering directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/libdnet-stripped'
Making all in include
make[6]: Entering directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/libdnet-stripped/include'
make all-recursive
make[7]: Entering directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/libdnet-stripped/include'
Making all in dnet
make[8]: Entering directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/libdnet-stripped/include/dnet'
make[8]: Nothing to be done for 'all'.
make[8]: Leaving directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/libdnet-stripped/include/dnet'
make[8]: Entering directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/libdnet-stripped/include'
make[8]: Nothing to be done for 'all-am'.
make[8]: Leaving directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/libdnet-stripped/include'
make[7]: Leaving directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/libdnet-stripped/include'
make[6]: Leaving directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/libdnet-stripped/include'
Making all in src
make[6]: Entering directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/libdnet-stripped/src'
make[6]: Nothing to be done for 'all'.
make[6]: Leaving directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/libdnet-stripped/src'
make[6]: Entering directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/libdnet-stripped'
make[6]: Nothing to be done for 'all-am'.
make[6]: Leaving directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/libdnet-stripped'
make[5]: Leaving directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/libdnet-stripped'
arm-openwrt-linux-muslgnueabi-g++ -c -I./liblinear -I./libdnet-stripped/include -I/home/bruno/lede/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/usr/include -I/home/bruno/lede/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/usr/include -I/home/bruno/lede/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/usr/include -I/home/bruno/lede/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/include -I/home/bruno/lede/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-5.5.0_musl_eabi/usr/include -I/home/bruno/lede/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-5.5.0_musl_eabi/include/fortify -I/home/bruno/lede/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-5.5.0_musl_eabi/include -I./nbase -I./nsock/include -DHAVE_CONFIG_H -DNMAP_NAME=\"Nmap\" -DNMAP_URL=\"https://nmap.org\" -DNMAP_PLATFORM=\"arm-openwrt-linux-gnu\" -DNMAPDATADIR=\"/usr/share/nmap\" -D_FORTIFY_SOURCE=2 -Os -pipe -mcpu=cortex-a15 -mfpu=neon-vfpv4 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -iremap/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60:nmap-7.60 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -fno-builtin -Wall -fno-strict-aliasing FingerPrintResults.cc -o FingerPrintResults.o
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined
<command-line>:0:0: note: this is the location of the previous definition
In file included from output.h:174:0,
from NmapOps.h:138,
from FingerPrintResults.cc:135:
nse_main.h:49:29: error: 'lua_KContext' has not been declared
int nse_yield (lua_State *, lua_KContext, lua_KFunction);
^
nse_main.h:49:43: error: 'lua_KFunction' has not been declared
int nse_yield (lua_State *, lua_KContext, lua_KFunction);
^
Makefile:118: recipe for target 'FingerPrintResults.o' failed
make[4]: *** [FingerPrintResults.o] Error 1
make[4]: Leaving directory '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60'
Makefile:138: recipe for target '/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/.built' failed
make[3]: *** [/home/bruno/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/nmap-nossl/nmap-7.60/.built] Error 2
make[3]: Leaving directory '/home/bruno/lede/feeds/packages/net/nmap'
package/Makefile:106: recipe for target 'package/feeds/packages/nmap/compile' failed