mirror of
https://github.com/sqlmapproject/sqlmap
synced 2025-12-06 16:32:23 +01:00
Fix for #1676
This commit is contained in:
parent
ee0439cf11
commit
954b4ec32b
1 changed files with 9 additions and 10 deletions
|
|
@ -177,10 +177,10 @@ class Task(object):
|
|||
|
||||
def engine_kill(self):
|
||||
if self.process:
|
||||
try:
|
||||
self.process.kill()
|
||||
return self.process.wait()
|
||||
else:
|
||||
return None
|
||||
except:
|
||||
pass
|
||||
|
||||
def engine_get_id(self):
|
||||
if self.process:
|
||||
|
|
@ -391,11 +391,10 @@ def task_flush(taskid):
|
|||
"""
|
||||
Flush task spool (delete all tasks)
|
||||
"""
|
||||
if is_admin(taskid):
|
||||
DataStore.tasks = dict()
|
||||
else:
|
||||
|
||||
for key in list(DataStore.tasks):
|
||||
if DataStore.tasks[key].remote_addr == request.remote_addr:
|
||||
if is_admin(taskid) or DataStore.tasks[key].remote_addr == request.remote_addr:
|
||||
DataStore.tasks[key].engine_kill()
|
||||
del DataStore.tasks[key]
|
||||
|
||||
logger.debug("[%s] Flushed task pool (%s)" % (taskid, "admin" if is_admin(taskid) else request.remote_addr))
|
||||
|
|
|
|||
Loading…
Reference in a new issue