mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
minor code cleanup
This commit is contained in:
parent
5aaf7f1aa6
commit
8b510c55fb
|
@ -509,17 +509,22 @@ class Metasploit:
|
|||
|
||||
if not initialized:
|
||||
match = re.search("session ([\d]+) opened", out)
|
||||
|
||||
if match:
|
||||
initialized = True
|
||||
self._loadMetExtensions(proc, match.group(1))
|
||||
|
||||
if "shell" in self.payloadStr:
|
||||
send_all(proc, "whoami\n" if Backend.isOs(OS.WINDOWS) else "uname -a ; id\n")
|
||||
if conf.liveTest:
|
||||
time.sleep(2)
|
||||
|
||||
if conf.liveTest:
|
||||
send_all(proc, "exit\n")
|
||||
|
||||
initialized = True
|
||||
|
||||
elif time.time() - start_time > METASPLOIT_SESSION_TIMEOUT:
|
||||
proc.kill()
|
||||
errMsg = "Timeout occurred while attempting "
|
||||
errMsg = "timeout occurred while attempting "
|
||||
errMsg += "to open a remote session"
|
||||
raise SqlmapGenericException(errMsg)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user