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

Skip to content

Commit fea5cc8

Browse files
committed
Minor patch
1 parent 94091cd commit fea5cc8

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

lib/core/option.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@
133133
from lib.core.settings import VERSION_STRING
134134
from lib.core.settings import WEBSCARAB_SPLITTER
135135
from lib.core.threads import getCurrentThreadData
136+
from lib.core.threads import setDaemon
136137
from lib.core.update import update
137138
from lib.parse.configfile import configFileParser
138139
from lib.parse.payloads import loadBoundaries
@@ -1063,6 +1064,7 @@ def connect(self, address):
10631064
socket.socket.connect = connect
10641065

10651066
thread = threading.Thread(target=_)
1067+
setDaemon(thread)
10661068
thread.start()
10671069

10681070
def _setHTTPHandlers():

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.revision import getRevisionNumber
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.0.5.27"
22+
VERSION = "1.0.5.28"
2323
REVISION = getRevisionNumber()
2424
STABLE = VERSION.count('.') <= 2
2525
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")

sqlmap.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import shutil
2121
import sys
2222
import thread
23+
import threading
2324
import time
2425
import traceback
2526
import warnings
@@ -275,6 +276,10 @@ def main():
275276
if conf.get("dumper"):
276277
conf.dumper.flush()
277278

279+
if threading.activeCount() > 1:
280+
logger.debug("short delay for thread finalization")
281+
time.sleep(0.5)
282+
278283
# Reference: http://stackoverflow.com/questions/1635080/terminate-a-multi-thread-python-program
279284
if conf.get("threads", 0) > 1 or conf.get("dnsServer"):
280285
os._exit(0)

0 commit comments

Comments
 (0)