Skip to content

Commit 27caff5

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 19ea1bc commit 27caff5

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

nxc/modules/schtask_as.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,9 @@ def gen_xml(self, command, fileless=False):
186186
"""
187187
if self.__retOutput:
188188
if self.task is None:
189-
self.__output_filename = f"\\Windows\\Temp\\{gen_random_string(6)}"
189+
self.__output_filename = f"\\Windows\\Temp\\{gen_random_string(6)}"
190190
else:
191-
self.__output_filename = f"\\Windows\\Temp\\{self.task}"
192-
193-
194-
#self.__output_filename = f"\\Windows\\Temp\\{gen_random_string(6)}"
191+
self.__output_filename = f"\\Windows\\Temp\\{self.task}"
195192
if fileless:
196193
local_ip = self.__rpctransport.get_socket().getsockname()[0]
197194
argument_xml = f" <Arguments>/C {command} &gt; \\\\{local_ip}\\{self.__share_name}\\{self.__output_filename} 2&gt;&amp;1</Arguments>"
@@ -217,8 +214,6 @@ def execute_handler(self, command, fileless=False):
217214

218215
dce.set_credentials(*self.__rpctransport.get_credentials())
219216
dce.connect()
220-
221-
#tmpName = gen_random_string(8)
222217
if self.task is None:
223218
tmpName = gen_random_string(8)
224219
else:

0 commit comments

Comments
 (0)