mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 08:14:24 +03:00
Minor refactoring
This commit is contained in:
parent
f970b4f240
commit
7c06a937e5
|
@ -507,6 +507,8 @@ class Metasploit:
|
|||
if pwnBofCond or smbRelayCond:
|
||||
func()
|
||||
|
||||
timeout = time.time() - start_time > METASPLOIT_SESSION_TIMEOUT
|
||||
|
||||
if not initialized:
|
||||
match = re.search("session ([\d]+) opened", out)
|
||||
|
||||
|
@ -519,13 +521,13 @@ class Metasploit:
|
|||
|
||||
initialized = True
|
||||
|
||||
elif time.time() - start_time > METASPLOIT_SESSION_TIMEOUT:
|
||||
elif timeout:
|
||||
proc.kill()
|
||||
errMsg = "timeout occurred while attempting "
|
||||
errMsg += "to open a remote session"
|
||||
raise SqlmapGenericException(errMsg)
|
||||
|
||||
if conf.liveTest and time.time() - start_time > METASPLOIT_SESSION_TIMEOUT:
|
||||
if conf.liveTest and timeout:
|
||||
if initialized:
|
||||
send_all(proc, "exit\n")
|
||||
time.sleep(2)
|
||||
|
|
Loading…
Reference in New Issue
Block a user