Skip to content

Commit e337a6d

Browse files
committed
Added warnings for Windows platform.
1 parent 9126ae7 commit e337a6d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/ssh_audit/dheat.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import select
2929
import socket
3030
import struct
31+
import sys
3132
import time
3233
import traceback
3334

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

318319
socket_list.remove(s)
319320

321+
if sys.platform == "win32":
322+
DHEat.YELLOWB = "\033[1;93m"
323+
DHEat.CLEAR = "\033[0m"
324+
print("%sUnfortunately, this feature is not currently functional under Windows. This should get fixed in a future release. See: https://github.com/jtesta/ssh-audit/issues/261%s" % (DHEat.YELLOWB, DHEat.CLEAR))
325+
return ""
320326

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

692698

693699
self.output()
700+
if sys.platform == "win32":
701+
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))
702+
694703
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))
695704

696705
# 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.

0 commit comments

Comments
 (0)