Skip to content

Commit 30806ee

Browse files
committed
Fix description and ensure output path has backslashes
1 parent f99e8cc commit 30806ee

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

nxc/modules/schtask_as.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def options(self, context, module_options):
1818
BINARY OPTIONAL: Upload the binary to be executed by CMD
1919
TASK OPTIONAL: Set a name for the scheduled task name
2020
FILE OPTIONAL: Set a name for the command output file
21-
LOCATION OPTIONAL: Set a location for the command output file (e.g. '\tmp\')
21+
LOCATION OPTIONAL: Set a location for the command output file (e.g. 'C:\\Windows\\Temp\\')
2222
2323
Example:
2424
-------
@@ -46,7 +46,8 @@ def options(self, context, module_options):
4646
self.output_filename = module_options["FILE"]
4747

4848
if "LOCATION" in module_options:
49-
self.output_file_location = module_options["LOCATION"]
49+
# Ensure trailing backslashes
50+
self.output_file_location = module_options["LOCATION"].rstrip("\\") + "\\"
5051

5152
name = "schtask_as"
5253
description = "Remotely execute a scheduled task as a logged on user"

0 commit comments

Comments
 (0)