@@ -111,7 +111,6 @@ def gen_xml(self, command):
111111 ]
112112 random .shuffle (idleSettings )
113113 randomized_idleSettings = "\n " .join (idleSettings )
114- random_digit = random .randint (2 , 6 )
115114
116115 match = re .match (r'^(.+?\\[^\\ ]+)\s+(.*)' , command )
117116 if match :
@@ -124,7 +123,7 @@ def gen_xml(self, command):
124123 cmd_args = f"/c { command } "
125124
126125 xml = f"""<?xml version="1.0" encoding="UTF-16"?>
127- <Task version="1.{ random_digit } " xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
126+ <Task version="1.3 " xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
128127 <Triggers>
129128 <RegistrationTrigger>
130129 <EndBoundary>{ self .get_end_boundary ()} </EndBoundary>
@@ -182,7 +181,7 @@ def execute_handler(self, command):
182181 dce .set_credentials (* self .__rpctransport .get_credentials ())
183182 dce .connect ()
184183 xml = self .gen_xml (command )
185-
184+
186185 self .logger .debug (f"Task XML: { xml } " )
187186 self .logger .info (f"Creating task \\ { self .task_name } " )
188187 try :
@@ -252,6 +251,7 @@ def execute_handler(self, command):
252251 smbConnection .deleteFile (self .__share , self .__output_filename )
253252 except Exception :
254253 pass
254+
255255 else :
256256 self .logger .display ("No output file was saved to be retrived" )
257257 dce .disconnect ()
0 commit comments