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

Skip to content

Commit f970b4f

Browse files
committed
minor adjustment fixing the regression test stall
1 parent e48181e commit f970b4f

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

lib/takeover/metasploit.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,12 @@ def _controlMsfCmd(self, proc, func):
525525
errMsg += "to open a remote session"
526526
raise SqlmapGenericException(errMsg)
527527

528-
elif conf.liveTest and time.time() - start_time > METASPLOIT_SESSION_TIMEOUT:
529-
proc.kill()
528+
if conf.liveTest and time.time() - start_time > METASPLOIT_SESSION_TIMEOUT:
529+
if initialized:
530+
send_all(proc, "exit\n")
531+
time.sleep(2)
532+
else:
533+
proc.kill()
530534

531535
except (EOFError, IOError):
532536
return proc.returncode

0 commit comments

Comments
 (0)