You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many versions of netcat do not have the nc -G <integer> option. On many Linux OS's these will fail as a result.
One alternative is to use the -w option, and this won't have the same functionality so probably isn't a good choice.
Another alternative would be to use timeout from the GNU coreutils, if it is installed. This would help, and would also still leave a lot of POSIX operating systems unsupported.
Perhaps the "right" thing to do is to look for nc in the path, verify it has the -G option, and use it. If it's not there or doesn't support -G, look for timeout and verify it's the GNU program (it's a commonly used name!) and use it if it is.
If that doesn't work, maybe we could try the interactive shell approach… and if that doesn't work, try to use perl or python, etc.
At the very least, though, we need an alternative to nc -G since it's common for nc to not support the -G option.
The text was updated successfully, but these errors were encountered:
Another solution could be to set nmap package as mandatory dependency for this plugin and use 'ncat' instead of 'nc'.
UPDATE:
This works on centos7 (Ncat: Version 7.50) and ubuntu18 (Ncat: Version 7.60), but not on ubuntu16 (Ncat: Version 7.01)
Many versions of netcat do not have the
nc -G <integer>
option. On many Linux OS's these will fail as a result.One alternative is to use the
-w
option, and this won't have the same functionality so probably isn't a good choice.Another alternative would be to use
timeout
from the GNU coreutils, if it is installed. This would help, and would also still leave a lot of POSIX operating systems unsupported.It can be done by launching an interactive shell, as described here: https://unix.stackexchange.com/questions/10698/timing-out-in-a-shell-script/18711#18711
Perhaps the "right" thing to do is to look for
nc
in the path, verify it has the-G
option, and use it. If it's not there or doesn't support-G
, look fortimeout
and verify it's the GNU program (it's a commonly used name!) and use it if it is.If that doesn't work, maybe we could try the interactive shell approach… and if that doesn't work, try to use
perl
orpython
, etc.At the very least, though, we need an alternative to
nc -G
since it's common fornc
to not support the-G
option.The text was updated successfully, but these errors were encountered: