You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
self.logger.fail("ATEXEC: Could not retrieve output file, it may have been detected by AV. Please increase the number of tries with the option '--get-output-tries'. If it is still failing, try the 'wmi' protocol or another exec method")
234
-
break
235
-
if"STATUS_BAD_NETWORK_NAME"instr(e):
236
-
self.logger.fail(f"ATEXEC: Getting the output file failed - target has blocked access to the share: {self.__share} (but the command may have executed!)")
237
-
break
238
-
elif"STATUS_VIRUS_INFECTED"instr(e):
239
-
self.logger.fail("Command did not run because a virus was detected")
240
-
break
241
-
# When executing PowerShell and the command is still running, we get a sharing violation
242
-
# We can use that information to wait longer than if the file is not found (probably av or something)
243
-
if"STATUS_SHARING_VIOLATION"instr(e):
244
-
self.logger.info(f"File {self.__share}\\{self.__output_filename} is still in use with {self.__tries-tries} tries left, retrying...")
245
-
tries+=1
246
-
sleep(1)
247
-
elif"STATUS_OBJECT_NAME_NOT_FOUND"instr(e):
248
-
self.logger.info(f"File {self.__share}\\{self.__output_filename} not found with {self.__tries-tries} tries left, deducting 10 tries and retrying...")
249
-
tries+=10
250
-
sleep(1)
251
-
else:
252
-
self.logger.debug(f"Exception when trying to read output file: {e!s}. {self.__tries-tries} tries left, retrying...")
self.logger.fail("ATEXEC: Could not retrieve output file, it may have been detected by AV. Please increase the number of tries with the option '--get-output-tries'. If it is still failing, try the 'wmi' protocol or another exec method")
193
+
break
194
+
if"STATUS_BAD_NETWORK_NAME"instr(e):
195
+
self.logger.fail(f"ATEXEC: Getting the output file failed - target has blocked access to the share: {self.__share} (but the command may have executed!)")
196
+
break
197
+
elif"STATUS_VIRUS_INFECTED"instr(e):
198
+
self.logger.fail("Command did not run because a virus was detected")
199
+
break
200
+
# When executing PowerShell and the command is still running, we get a sharing violation
201
+
# We can use that information to wait longer than if the file is not found (probably av or something)
202
+
if"STATUS_SHARING_VIOLATION"instr(e):
203
+
self.logger.info(f"File {self.__share}\\{self.__output_filename} is still in use with {self.__tries-tries} tries left, retrying...")
204
+
tries+=1
205
+
sleep(1)
206
+
elif"STATUS_OBJECT_NAME_NOT_FOUND"instr(e):
207
+
self.logger.info(f"File {self.__share}\\{self.__output_filename} not found with {self.__tries-tries} tries left, deducting 10 tries and retrying...")
208
+
tries+=10
209
+
sleep(1)
210
+
else:
211
+
self.logger.debug(f"Exception when trying to read output file: {e!s}. {self.__tries-tries} tries left, retrying...")
0 commit comments