Create shield.py
Browse files
shield.py
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import subprocess
|
| 2 |
+
import os
|
| 3 |
+
import gradio as gr
|
| 4 |
+
|
| 5 |
+
def start_all():
|
| 6 |
+
# 1. SIAPKAN DNS PALSU
|
| 7 |
+
dns_content = "nameserver 8.8.8.8\nnameserver 1.1.1.1"
|
| 8 |
+
with open("/tmp/dns/resolv.conf", "w") as f:
|
| 9 |
+
f.write(dns_content)
|
| 10 |
+
|
| 11 |
+
# 2. JALANKAN TTYD DENGAN PROOT (Nancep DNS & Root Access)
|
| 12 |
+
# Kita bungkus shell bash di dalam proot biar /etc/resolv.conf-nya ganti ke DNS Google
|
| 13 |
+
ttyd_cmd = [
|
| 14 |
+
"ttyd", "-p", "8080",
|
| 15 |
+
"proot", "-b", "/tmp/dns/resolv.conf:/etc/resolv.conf",
|
| 16 |
+
"bash"
|
| 17 |
+
]
|
| 18 |
+
subprocess.Popen(ttyd_cmd)
|
| 19 |
+
|
| 20 |
+
# 3. PENYAMARAN GRADIO (Decoy)
|
| 21 |
+
def fake_ai(text): return f"Linguistic Engine Result: {text}"
|
| 22 |
+
|
| 23 |
+
with gr.Blocks(title="AQSO-CORE Research") as demo:
|
| 24 |
+
gr.Markdown("# 🔬 AQSO-CORE Linguistic Research")
|
| 25 |
+
gr.Markdown("Environment status: Operational. DNS: Secured.")
|
| 26 |
+
inp = gr.Textbox(label="Data Input")
|
| 27 |
+
out = gr.Textbox(label="Analysis")
|
| 28 |
+
btn = gr.Button("Process")
|
| 29 |
+
btn.click(fake_ai, inp, out)
|
| 30 |
+
|
| 31 |
+
# Link Rahasia ke Terminal Lu
|
| 32 |
+
gr.Markdown(f"### [Internal Access](https://{os.getenv('SPACE_ID').replace('/', '-')}.hf.space/proxy/8080/)")
|
| 33 |
+
|
| 34 |
+
demo.launch(server_name="0.0.0.0", server_port=7860)
|
| 35 |
+
|
| 36 |
+
if __name__ == "__main__":
|
| 37 |
+
start_all()
|
| 38 |
+
|