Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 138a846

Browse files
committed
possible fix for regression test stall
1 parent 1596b9e commit 138a846

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/takeover/metasploit.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,9 +517,6 @@ def _controlMsfCmd(self, proc, func):
517517
send_all(proc, "whoami\n" if Backend.isOs(OS.WINDOWS) else "uname -a ; id\n")
518518
time.sleep(2)
519519

520-
if conf.liveTest:
521-
send_all(proc, "exit\n")
522-
523520
initialized = True
524521

525522
elif time.time() - start_time > METASPLOIT_SESSION_TIMEOUT:
@@ -528,6 +525,9 @@ def _controlMsfCmd(self, proc, func):
528525
errMsg += "to open a remote session"
529526
raise SqlmapGenericException(errMsg)
530527

528+
elif conf.liveTest and time.time() - start_time > METASPLOIT_SESSION_TIMEOUT:
529+
proc.kill()
530+
531531
except EOFError:
532532
returncode = proc.wait()
533533

0 commit comments

Comments
 (0)