forked from p15670423/monkey
Added debug log with the deletion commands
This commit is contained in:
parent
f5aeb0a38e
commit
04e1817931
|
@ -55,8 +55,9 @@ class CommunicateAsNewUser(PBA):
|
||||||
exit_status = os.system(final_command)
|
exit_status = os.system(final_command)
|
||||||
self.send_ping_result_telemetry(exit_status, commandline, username)
|
self.send_ping_result_telemetry(exit_status, commandline, username)
|
||||||
# delete the user, async in case it gets stuck.
|
# delete the user, async in case it gets stuck.
|
||||||
_ = subprocess.Popen(
|
commands_to_delete_user = get_linux_commands_to_delete_user(username)
|
||||||
get_linux_commands_to_delete_user(username), stderr=subprocess.STDOUT, shell=True)
|
logger.debug("Trying to delete the user {} with commands {}".format(username, str(commands_to_delete_user)))
|
||||||
|
_ = subprocess.Popen(commands_to_delete_user, stderr=subprocess.STDOUT, shell=True)
|
||||||
# Leaking the process on purpose - nothing we can do if it's stuck.
|
# Leaking the process on purpose - nothing we can do if it's stuck.
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
PostBreachTelem(self, (e.output, False)).send()
|
PostBreachTelem(self, (e.output, False)).send()
|
||||||
|
|
Loading…
Reference in New Issue