Skip to content

Commit

Permalink
Added warnings for Windows platform.
Browse files Browse the repository at this point in the history
  • Loading branch information
jtesta committed Apr 19, 2024
1 parent 9126ae7 commit b9f569f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/ssh_audit/dheat.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import select
import socket
import struct
import sys
import time
import traceback

Expand Down Expand Up @@ -317,6 +318,11 @@ def _close_socket(socket_list: List[socket.socket], s: socket.socket) -> None:

socket_list.remove(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 ""

spinner = ["-", "\\", "|", "/"]
spinner_index = 0
Expand Down Expand Up @@ -691,6 +697,9 @@ def _run(self) -> bool:


self.output()
if sys.platform == "win32":
self.output("%sWARNING:%s this feature has not been thoroughly tested on Windows. It may perform worse than on UNIX OSes." % (self.YELLOWB, self.CLEAR))

self.output("Running DHEat test against %s[%s]:%u%s with %s%u%s concurrent sockets..." % (self.WHITEB, self.target, self.port, self.CLEAR, self.WHITEB, self.concurrent_connections, self.CLEAR))

# If the user didn't specify an exact kex algorithm to test, check our prioritized list against what the server supports. Larger p-values (such as group18: 8192-bits) cause the most strain on the server.
Expand Down

0 comments on commit b9f569f

Please sign in to comment.