2 Commits

Author SHA1 Message Date
Joe Testa dc615cef7f Fixed DH rate testing on Windows. (#261) 2024-09-28 18:39:55 -04:00
Joe Testa cb6142c609 Ignore mypy errors on colorama import. 2024-09-28 17:43:32 -04:00
3 changed files with 3 additions and 8 deletions
+1
View File
@@ -230,6 +230,7 @@ For convenience, a web front-end on top of the command-line tool is available at
- Fixed host key tests from only reporting a key type at most once despite multiple hosts supporting it; credit [Daniel Lenski](https://github.com/dlenskiSB).
- Fixed DHEat connection rate testing on MacOS X and BSD platforms; credit [Drew Noel](https://github.com/drewmnoel) and [Michael Osipov](https://github.com/michael-o).
- Fixed invalid JSON output when a socket error occurs while performing a client audit.
- Fixed `--conn-rate-test` feature on Windows.
- When scanning multiple targets (using `-T`/`--targets`), the `-p`/`--port` option will now be used as the default port (set to 22 if `-p`/`--port` is not given). Hosts specified in the file can override this default with an explicit port number (i.e.: "host1:1234"). For example, when using `-T targets.txt -p 222`, all hosts in `targets.txt` that do not explicitly include a port number will default to 222; when using `-T targets.txt` (without `-p`), all hosts will use a default of 22.
- Now reports ECDSA and DSS fingerprints when in verbose mode; partial credit [Daniel Lenski](https://github.com/dlenskiSB).
- Added 1 new cipher: `grasshopper-ctr128`.
+1 -7
View File
@@ -324,12 +324,6 @@ class DHEat:
del socket_dict[s]
if sys.platform == "win32":
DHEat.YELLOWB = "\033[1;93m"
DHEat.CLEAR = "\033[0m"
print("\n%sUnfortunately, this feature is not currently functional under Windows.%s This should get fixed in a future release. See: <https://github.com/jtesta/ssh-audit/issues/261>" % (DHEat.YELLOWB, DHEat.CLEAR))
return ""
# Resolve the target into an IP address
out.d("Resolving target %s..." % aconf.host)
target_address_family, target_ip_address = DHEat._resolve_hostname(aconf.host, aconf.ip_version_preference)
@@ -443,7 +437,7 @@ class DHEat:
# out.d("Creating socket (%u of %u already exist)..." % (len(socket_dict), concurrent_sockets), write_now=True)
ret = s.connect_ex((target_ip_address, aconf.port))
num_attempted_connections += 1
if ret in [0, errno.EINPROGRESS]:
if ret in [0, errno.EINPROGRESS, errno.EWOULDBLOCK]:
socket_dict[s] = now
else:
out.d("connect_ex() returned: %s (%d)" % (os.strerror(ret), ret), write_now=True)
+1 -1
View File
@@ -68,7 +68,7 @@ from ssh_audit.utils import Utils
# Only import colorama under Windows. Other OSes can natively handle terminal colors.
if sys.platform == 'win32':
try:
from colorama import just_fix_windows_console
from colorama import just_fix_windows_console # type: ignore
just_fix_windows_console()
except ImportError:
pass