Merge pull request #561 from Gianfrancoalongi/sqlite3-crash

Stop crackmapexec crashing from concurrency-issues (tested with SMB-mode)
main
mpgn 2022-06-17 22:14:09 +02:00 committed by GitHub
commit 9e2846ca22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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)