Skip to content

Commit 086fad7

Browse files
authored
Update schtask_as.py
Signed-off-by: Kahvi-0xFF <46513413+Kahvi-0@users.noreply.github.com>
1 parent f1c2840 commit 086fad7

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

nxc/modules/schtask_as.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,7 @@ def on_admin_login(self, context, connection):
102102
)
103103

104104
self.logger.display(f"Executing {self.command_to_run} as {self.run_task_as}")
105-
#output = exec_method.execute(self.command_to_run, True)
106-
if "cmd" in self.command_to_run.lower() or "powershell" in self.command_to_run.lower():
107-
output = exec_method.execute(self.command_to_run, True)
108-
else:
109-
output = exec_method.execute(self.command_to_run, False)
105+
output = exec_method.execute(self.command_to_run, True)
110106

111107
try:
112108
if not isinstance(output, str):
@@ -124,8 +120,6 @@ def on_admin_login(self, context, connection):
124120
finally:
125121
if self.binary_to_upload:
126122
try:
127-
context.log.success("Sleeping for 10 seconds to let binary run")
128-
sleep(10)
129123
connection.conn.deleteFile(self.share, f"{binary_file_location}{self.binary_to_upload_name}")
130124
context.log.success(f"Binary {binary_file_location}{self.binary_to_upload_name} successfully deleted")
131125
except Exception as e:

0 commit comments

Comments
 (0)