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

addr.port().is_reachable do not work in CentOS 7 #458

Open
RainbowHerbicides opened this issue Jun 26, 2019 · 3 comments
Open

addr.port().is_reachable do not work in CentOS 7 #458

RainbowHerbicides opened this issue Jun 26, 2019 · 3 comments
Labels
bug This issue/PR relates to a bug.

Comments

@RainbowHerbicides
Copy link

If package nmap-ncat from default repo centos-base is present command nc -w 1 -z will not work due to absence of -z flag in version 6.40 and method is_reachable for port will always return False

Possible solution: check that nc version (nc --version) is not older than 7.25 (when -z option has been added)
nmap/nmap#444
https://nmap.org/changelog - mark [Ncat][GH#444]

@philpep philpep added the bug This issue/PR relates to a bug. label Jul 22, 2019
@philpep
Copy link
Contributor

philpep commented Jul 22, 2019

Maybe we should drop the -z here ? What version of centos is impacted by this bug ? 6 or 7 or both ?
Maybe we can detect CentOS version and drop the -z only for this specific CentOS version ?

@julcollas
Copy link
Contributor

By replacing all the time nc -w 1 -z by echo /dev/zero | nc -w 1should work in all OS

@julcollas
Copy link
Contributor

I made a suggestion in #490 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants