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

Skip to content

Commit 3786541

Browse files
committed
Merge branch 'master' of github.com:sqlmapproject/sqlmap
2 parents 8bfee3b + 6d80286 commit 3786541

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

lib/takeover/metasploit.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,8 @@ def _controlMsfCmd(self, proc, func):
507507
if pwnBofCond or smbRelayCond:
508508
func()
509509

510+
timeout = time.time() - start_time > METASPLOIT_SESSION_TIMEOUT
511+
510512
if not initialized:
511513
match = re.search("session ([\d]+) opened", out)
512514

@@ -519,13 +521,13 @@ def _controlMsfCmd(self, proc, func):
519521

520522
initialized = True
521523

522-
elif time.time() - start_time > METASPLOIT_SESSION_TIMEOUT:
524+
elif timeout:
523525
proc.kill()
524526
errMsg = "timeout occurred while attempting "
525527
errMsg += "to open a remote session"
526528
raise SqlmapGenericException(errMsg)
527529

528-
if conf.liveTest and time.time() - start_time > METASPLOIT_SESSION_TIMEOUT:
530+
if conf.liveTest and timeout:
529531
if initialized:
530532
send_all(proc, "exit\n")
531533
time.sleep(2)

plugins/dbms/mysql/fingerprint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def checkDbms(self):
181181
# Reference: http://bugs.mysql.com/bug.php?id=15855
182182

183183
# Determine if it is MySQL >= 5.0.0
184-
if inject.checkBooleanExpression("ISNULL(TIMESTAMPADD(MINUTE,[RANDNUM],[RANDNUM]))"):
184+
if inject.checkBooleanExpression("ISNULL(TIMESTAMPADD(MINUTE,[RANDNUM],0))"):
185185
kb.data.has_information_schema = True
186186
Backend.setVersion(">= 5.0.0")
187187
setDbms("%s 5" % DBMS.MYSQL)

0 commit comments

Comments
 (0)