Nig / shield.py
Aqso's picture
Create shield.py
a843a0e verified
import subprocess
import os
import gradio as gr
def start_all():
# 1. SIAPKAN DNS PALSU
dns_content = "nameserver 8.8.8.8\nnameserver 1.1.1.1"
with open("/tmp/dns/resolv.conf", "w") as f:
f.write(dns_content)
# 2. JALANKAN TTYD DENGAN PROOT (Nancep DNS & Root Access)
# Kita bungkus shell bash di dalam proot biar /etc/resolv.conf-nya ganti ke DNS Google
ttyd_cmd = [
"ttyd", "-p", "8080",
"proot", "-b", "/tmp/dns/resolv.conf:/etc/resolv.conf",
"bash"
]
subprocess.Popen(ttyd_cmd)
# 3. PENYAMARAN GRADIO (Decoy)
def fake_ai(text): return f"Linguistic Engine Result: {text}"
with gr.Blocks(title="AQSO-CORE Research") as demo:
gr.Markdown("# 🔬 AQSO-CORE Linguistic Research")
gr.Markdown("Environment status: Operational. DNS: Secured.")
inp = gr.Textbox(label="Data Input")
out = gr.Textbox(label="Analysis")
btn = gr.Button("Process")
btn.click(fake_ai, inp, out)
# Link Rahasia ke Terminal Lu
gr.Markdown(f"### [Internal Access](https://{os.getenv('SPACE_ID').replace('/', '-')}.hf.space/proxy/8080/)")
demo.launch(server_name="0.0.0.0", server_port=7860)
if __name__ == "__main__":
start_all()