Skip to content
This repository was archived by the owner on Dec 6, 2023. It is now read-only.

Commit 3ec981f

Browse files
author
byt3bl33d3r
committed
Re-added the --timeout option
1 parent ade4c12 commit 3ec981f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crackmapexec.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
parser.add_argument("--server", choices={'http', 'https'}, default='https', help='Use the selected server (defaults to https)')
7373
parser.add_argument("--server-port", metavar='PORT', type=int, help='Start the server on the specified port')
7474
#How much fail can we limit? can we fail at failing to limit? da da da dum
75+
parser.add_argument("--timeout", default=20, type=int, help='Max timeout in seconds of each thread (default: 20)')
7576
parser.add_argument("--fail-limit", metavar='LIMIT', type=int, default=None, help='The max number of failed login attempts allowed per host (default: None)')
7677
parser.add_argument("--gfail-limit", metavar='LIMIT', type=int, default=None, help='The max number of failed login attempts allowed globally (default: None)')
7778
parser.add_argument("--verbose", action='store_true', dest='verbose', help="Enable verbose output")
@@ -282,7 +283,8 @@ def concurrency(targets):
282283
try:
283284
pool = Pool(args.threads)
284285
jobs = [pool.spawn(main_greenlet, str(target)) for target in targets]
285-
joinall(jobs)
286+
for job in jobs:
287+
job.join(timeout=args.timeout)
286288
except KeyboardInterrupt:
287289
shutdown(0)
288290

0 commit comments

Comments
 (0)