我想用 找出所有可用的路由器nmap
。
在命令行中输入此命令将返回预期的输出。
nmap --script=broadcast-dchp-discover -e eno1
但是当我尝试在简短的 bash 脚本中运行此命令时nmap
返回错误:
NSE: failed to initialize the script engine:
/usr/bin/../share/nmap/nse_main.lua:801: 'broadcast-dchp-discover' did not match a category, filename, or directory
stack traceback:
[C]: in function 'error'
/usr/bin/../share/nmap/nse_main.lua:801: in function 'get_chosen_scripts'
/usr/bin/../share/nmap/nse_main.lua:1251: in main chunk
[C]: in ?
我究竟做错了什么?
答案1
您在命令行选项中有一个拼写错误:
错误:broadcast-dchp-discover 正确:broadcast-dhcp-discover