Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ncat: netcat -q secs option not supported #2422

Open
pothos opened this issue Jan 9, 2022 · 1 comment
Open

ncat: netcat -q secs option not supported #2422

pothos opened this issue Jan 9, 2022 · 1 comment

Comments

@pothos
Copy link

pothos commented Jan 9, 2022

Describe the bug
Both nc.traditional and nc.openbsd have a -q secs quit after EOF on stdin and delay of secs parameter which ncat does not support. This fails the command invocation when ncat is used as symlinked drop-in for nc.

To Reproduce
echo | ncat -q 1 1.1.1.1 53 results in ncat: invalid option -- 'q' Ncat: Try '--help' or man(1) ncat for more information, usage options and help. QUITTING.

Expected behavior
Same as echo|nc.traditional -q 1 1.1.1.1 53 would lead to exiting after one second without failure and nothing printed.
The -q 1 timeout kicks in becase stdin is closed after echo printed its single empty line.

Version info (please complete the following information):

  • OS: Linux 5.16rc8
  • Output of ncat --version: 7.80

Additional context
This is a compatibilty problem occuring on systems that try to stop shipping traditional or OpenBSD netcat, .e.g, on Flatcar Container Linux where nc is a symlink to ncat.

@dmiller-nmap
Copy link

Thanks for requesting this feature. The -q option is indeed unimplemented, as documented in our Ncat/netcat compatibility guide. I will label this issue as a feature request so we can prioritize it accordingly. Pull requests are also welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants