mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-03 22:31:34 +00:00
Implements option --time-limit (#5502)
This commit is contained in:
parent
c629374858
commit
e0ec2fcdbd
6 changed files with 16 additions and 3 deletions
|
|
@ -16,6 +16,7 @@ import codecs
|
|||
import json
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
|
||||
from lib.core.bigarray import BigArray
|
||||
from lib.core.compat import xrange
|
||||
|
|
@ -334,6 +335,10 @@ def getUnicode(value, encoding=None, noneToNull=False):
|
|||
True
|
||||
"""
|
||||
|
||||
# Best position for --time-limit mechanism
|
||||
if conf.get("timeLimit") and kb.get("startTime") and (time.time() - kb.startTime > conf.timeLimit):
|
||||
raise SystemExit
|
||||
|
||||
if noneToNull and value is None:
|
||||
return NULL
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue