Skip to content

Commit 755113d

Browse files
Kahvi-0Marshall-Hallenbeck
authored andcommitted
Update schtask_as.py
Signed-off-by: Kahvi-0xFF <46513413+Kahvi-0@users.noreply.github.com>
1 parent 447bded commit 755113d

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

nxc/modules/schtask_as.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ def options(self, context, module_options):
1818
"""
1919
CMD Command to execute
2020
USER User to execute command as
21-
TASK Set a name for the scheduled task name
22-
FILE Set a name for the command output file
23-
LOCATION Set a location for the command output file
21+
TASK OPTIONAL: Set a name for the scheduled task name
22+
FILE OPTIONAL: Set a name for the command output file
23+
LOCATION OPTIONAL: Set a location for the command output file
2424
"""
2525
self.cmd = self.user = self.task = self.file = self.location = self.time = None
2626
if "CMD" in module_options:
@@ -94,7 +94,7 @@ def on_admin_login(self, context, connection):
9494

9595

9696
class TSCH_EXEC:
97-
def __init__(self, target, share_name, username, password, domain, user, cmd, file2, task2, location, doKerberos=False, aesKey=None, remoteHost=None, kdcHost=None, hashes=None, logger=None, tries=None, share=None):
97+
def __init__(self, target, share_name, username, password, domain, user, cmd, file, task, location, doKerberos=False, aesKey=None, remoteHost=None, kdcHost=None, hashes=None, logger=None, tries=None, share=None):
9898
self.__target = target
9999
self.__username = username
100100
self.__password = password
@@ -114,8 +114,8 @@ def __init__(self, target, share_name, username, password, domain, user, cmd, fi
114114
self.logger = logger
115115
self.cmd = cmd
116116
self.user = user
117-
self.file = file2
118-
self.task = task2
117+
self.file = file
118+
self.task = task
119119
self.location = location
120120

121121

@@ -235,7 +235,7 @@ def execute_handler(self, command, fileless=False):
235235

236236
self.logger.info(f"Task XML: {xml}")
237237
taskCreated = False
238-
self.logger.display(f"Creating task \\{tmpName}")
238+
self.logger.info(f"Creating task \\{tmpName}")
239239
try:
240240
# windows server 2003 has no MSRPC_UUID_TSCHS, if it bind, it will return abstract_syntax_not_supported
241241
dce.set_auth_level(RPC_C_AUTHN_LEVEL_PKT_PRIVACY)
@@ -287,7 +287,7 @@ def execute_handler(self, command, fileless=False):
287287
tries = 1
288288
while True:
289289
try:
290-
self.logger.display(f"Attempting to read {self.__share}\\{self.__output_filename}")
290+
self.logger.info(f"Attempting to read {self.__share}\\{self.__output_filename}")
291291
smbConnection.getFile(self.__share, self.__output_filename, self.output_callback)
292292
break
293293
except Exception as e:

0 commit comments

Comments
 (0)