mirror of
https://git.freebsd.org/ports.git
synced 2025-07-07 04:19:17 -04:00
security/py-ssh-audit: fix hang on runtime
PR: 280827 Submitted by: michaelo
This commit is contained in:
parent
c444f6339d
commit
f02e397c3b
2 changed files with 24 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
PORTNAME= ssh-audit
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 3.2.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= security
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
||||
|
|
23
security/py-ssh-audit/files/patch-src_ssh__audit_dheat.py
Normal file
23
security/py-ssh-audit/files/patch-src_ssh__audit_dheat.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
--- src/ssh_audit/dheat.py.orig 2024-08-16 09:16:28 UTC
|
||||
+++ src/ssh_audit/dheat.py
|
||||
@@ -21,6 +21,7 @@
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
"""
|
||||
+import errno
|
||||
import multiprocessing
|
||||
import os
|
||||
import queue
|
||||
@@ -432,10 +433,10 @@ class DHEat:
|
||||
# out.d("Creating socket (%u of %u already exist)..." % (len(socket_dict), concurrent_sockets), write_now=True)
|
||||
ret = s.connect_ex((aconf.host, aconf.port))
|
||||
num_attempted_connections += 1
|
||||
- if ret in [0, 115]: # Check if connection is successful or EINPROGRESS.
|
||||
+ if ret in [0, errno.EINPROGRESS]:
|
||||
socket_dict[s] = now
|
||||
else:
|
||||
- out.d("connect_ex() returned: %d" % ret, write_now=True)
|
||||
+ out.d("connect_ex() returned: %s (%d)" % (os.strerror(ret), ret), write_now=True)
|
||||
|
||||
# out.d("Calling select() on %u sockets..." % len(socket_dict), write_now=True)
|
||||
socket_list: List[socket.socket] = [*socket_dict] # Get a list of sockets from the dictionary.
|
Loading…
Add table
Reference in a new issue