Stop crackmapexec from crashing completely when concurrency issues cause lock-contention on the database - in SMB-mode.
parent
e9bcd09bd2
commit
355b75e21f
|
@ -75,6 +75,8 @@ async def run_protocol(loop, protocol_obj, args, db, target, jitter):
|
|||
except asyncio.CancelledError:
|
||||
logging.debug("Stopping thread")
|
||||
thread.cancel()
|
||||
except sqlite3.OperationalError as e:
|
||||
logging.debug("Sqlite error - sqlite3.operationalError - {}".format(str(e)))
|
||||
|
||||
async def start_threadpool(protocol_obj, args, db, targets, jitter):
|
||||
pool = ThreadPoolExecutor(max_workers=args.threads + 1)
|
||||
|
@ -261,4 +263,4 @@ def main():
|
|||
module_server.shutdown()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
main()
|
||||
|
|
Loading…
Reference in New Issue