xaitax / CVE-2024-6387_Check

CVE-2024-6387_Check is a lightweight, efficient tool designed to identify servers running vulnerable versions of OpenSSH
GNU General Public License v3.0
381 stars 77 forks source link

Why contacting open ports twice? #6

Closed JirkaV closed 1 week ago

JirkaV commented 1 week ago

First, thanks for writing the script!

I was just curious - since the first benefit listed in README is "rapid scanning", why is each open port connected to twice? First to check if it's open and if it is, then another connection is used to fetch the banner?

It' be more efficient if the is_port_open() didn't exist at all and get_ssh_banner() raised an exception for closed ports that would then be handled in the check_vulnerability()

Just my 2 cents :)