-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Description
Adding target is not possible on Archlinux and Termux.
i'm trying to run this little script:
local target = require "target"
prerule = function()
local status, err = target.add( "localhost","1.1.1.1" )
print("status: " .. tostring(status))
print("err: " .. err)
end
action = function() return true endI'm running the script with:
nmap --script ./test.nse --script-args=newtargetsAnd the ouput is:
Starting Nmap 7.92 ( https://nmap.org ) at 2022-06-26 16:17 UTC
ERROR: to add targets run with -sC or --script options.
status: false
err: failed to add new targets.
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 0.29 seconds
I tried on docker with Debian, Ubuntu, Centos, Alpine and FreeBSD and it's working perfectly. However on Archlinux, Blackarch and also Termux with extra/nmap or blackarch/nmap it's not working.
Easy step for reproduce with docker:
docker run -it --rm archlinux:latest bash -c 'pacman -Sy --noconfirm nmap &&
echo """
local target = require \"target\"
prerule = function()
local status, err = target.add( \"localhost\",\"1.1.1.1\" )
print(\"status: \" .. tostring(status))
print(\"err: \" .. err)
end
action = function() return true end
""" > test.nse && nmap --script ./test.nse --script-args=newtargets'And with debian (working):
< docker run -it --rm archlinux:latest bash -c 'pacman -Sy --noconfirm nmap ;
---
> docker run -it --rm debian:latest bash -c 'apt upgrade && apt install -y nmap ;Reactions are currently unavailable