Minor patch

This commit is contained in:
Miroslav Stampar 2016-05-16 15:37:49 +02:00
parent 94091cd0e9
commit fea5cc8579
3 changed files with 8 additions and 1 deletions

View File

@ -133,6 +133,7 @@ from lib.core.settings import URI_INJECTABLE_REGEX
from lib.core.settings import VERSION_STRING
from lib.core.settings import WEBSCARAB_SPLITTER
from lib.core.threads import getCurrentThreadData
from lib.core.threads import setDaemon
from lib.core.update import update
from lib.parse.configfile import configFileParser
from lib.parse.payloads import loadBoundaries
@ -1063,6 +1064,7 @@ def _setSocketPreConnect():
socket.socket.connect = connect
thread = threading.Thread(target=_)
setDaemon(thread)
thread.start()
def _setHTTPHandlers():

View File

@ -19,7 +19,7 @@ from lib.core.enums import OS
from lib.core.revision import getRevisionNumber
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.0.5.27"
VERSION = "1.0.5.28"
REVISION = getRevisionNumber()
STABLE = VERSION.count('.') <= 2
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")

View File

@ -20,6 +20,7 @@ import re
import shutil
import sys
import thread
import threading
import time
import traceback
import warnings
@ -275,6 +276,10 @@ def main():
if conf.get("dumper"):
conf.dumper.flush()
if threading.activeCount() > 1:
logger.debug("short delay for thread finalization")
time.sleep(0.5)
# Reference: http://stackoverflow.com/questions/1635080/terminate-a-multi-thread-python-program
if conf.get("threads", 0) > 1 or conf.get("dnsServer"):
os._exit(0)