my nmap command is nmap -sU -sC --top-ports 20 and I encountered the following issue, it seems there is an error in the script itself. Do you know how to fix this?
NSE: ike-version against 10.10.10.116:500 threw an error! /usr/bin/../share/nmap/nselib/ike.lua:408: attempt to call a table value (upvalue 'PROTOCOL_IDS') stack traceback: /usr/bin/../share/nmap/nselib/ike.lua:408: in upvalue 'generate_aggressive' /usr/bin/../share/nmap/nselib/ike.lua:499: in function 'ike.request' /usr/bin/../share/nmap/scripts/ike-version.nse:75: in upvalue 'get_version' /usr/bin/../share/nmap/scripts/ike-version.nse:118: in function </usr/bin/../share/nmap/scripts/ike-version.nse:117> (...tail calls...)
The text was updated successfully, but these errors were encountered:
Ran into the same issue. If you look at ike.lua:408, it indeed tries to "call" PROTOCOL_IDS as if it is a function instead of looking up an index in the table. Replacing the parentheses with square brackets worked for me: the ike-version script now shows me the server's IKE info. Submitted a pull request (see the reference above).
If anyone wants to quickly hotfix their installation, just sudo vim /usr/share/nmap/nselib/ike.lua (or where-ever your ike.lua is installed) and replace the parentheses after PROTOCOL_IDS with square brackets as in the patch.