Update schtask_as.py

Signed-off-by: Kahvi-0xFF <46513413+Kahvi-0@users.noreply.github.com>
This commit is contained in:
Kahvi-0xFF
2025-08-13 00:31:47 -04:00
committed by GitHub
parent f1c2840957
commit 086fad7cb2
+1 -7
View File
@@ -102,11 +102,7 @@ class NXCModule:
)
self.logger.display(f"Executing {self.command_to_run} as {self.run_task_as}")
#output = exec_method.execute(self.command_to_run, True)
if "cmd" in self.command_to_run.lower() or "powershell" in self.command_to_run.lower():
output = exec_method.execute(self.command_to_run, True)
else:
output = exec_method.execute(self.command_to_run, False)
output = exec_method.execute(self.command_to_run, True)
try:
if not isinstance(output, str):
@@ -124,8 +120,6 @@ class NXCModule:
finally:
if self.binary_to_upload:
try:
context.log.success("Sleeping for 10 seconds to let binary run")
sleep(10)
connection.conn.deleteFile(self.share, f"{binary_file_location}{self.binary_to_upload_name}")
context.log.success(f"Binary {binary_file_location}{self.binary_to_upload_name} successfully deleted")
except Exception as e: