Update shield.py
Browse files
shield.py
CHANGED
|
@@ -5,11 +5,12 @@ import gradio as gr
|
|
| 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 (
|
| 12 |
-
#
|
| 13 |
ttyd_cmd = [
|
| 14 |
"ttyd", "-p", "8080",
|
| 15 |
"proot", "-b", "/tmp/dns/resolv.conf:/etc/resolv.conf",
|
|
@@ -17,19 +18,19 @@ def start_all():
|
|
| 17 |
]
|
| 18 |
subprocess.Popen(ttyd_cmd)
|
| 19 |
|
| 20 |
-
# 3.
|
| 21 |
-
def fake_ai(text): return f"Linguistic
|
| 22 |
|
| 23 |
with gr.Blocks(title="AQSO-CORE Research") as demo:
|
| 24 |
gr.Markdown("# 🔬 AQSO-CORE Linguistic Research")
|
| 25 |
-
gr.Markdown("
|
| 26 |
inp = gr.Textbox(label="Data Input")
|
| 27 |
-
out = gr.Textbox(label="
|
| 28 |
-
btn = gr.Button("
|
| 29 |
btn.click(fake_ai, inp, out)
|
| 30 |
|
| 31 |
-
# Link
|
| 32 |
-
gr.Markdown(f"### [
|
| 33 |
|
| 34 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|
| 35 |
|
|
|
|
| 5 |
def start_all():
|
| 6 |
# 1. SIAPKAN DNS PALSU
|
| 7 |
dns_content = "nameserver 8.8.8.8\nnameserver 1.1.1.1"
|
| 8 |
+
os.makedirs("/tmp/dns", exist_ok=True)
|
| 9 |
with open("/tmp/dns/resolv.conf", "w") as f:
|
| 10 |
f.write(dns_content)
|
| 11 |
|
| 12 |
+
# 2. JALANKAN TTYD DENGAN PROOT (DNS Nancep Langsung)
|
| 13 |
+
# Bash ini bakal dipaksa baca /tmp/dns/resolv.conf sebagai /etc/resolv.conf
|
| 14 |
ttyd_cmd = [
|
| 15 |
"ttyd", "-p", "8080",
|
| 16 |
"proot", "-b", "/tmp/dns/resolv.conf:/etc/resolv.conf",
|
|
|
|
| 18 |
]
|
| 19 |
subprocess.Popen(ttyd_cmd)
|
| 20 |
|
| 21 |
+
# 3. DECOY INTERFACE (Penyamaran biar gak ke-ban)
|
| 22 |
+
def fake_ai(text): return f"Linguistic Analysis: {text}"
|
| 23 |
|
| 24 |
with gr.Blocks(title="AQSO-CORE Research") as demo:
|
| 25 |
gr.Markdown("# 🔬 AQSO-CORE Linguistic Research")
|
| 26 |
+
gr.Markdown("DNS Status: **Secured (8.8.8.8)**")
|
| 27 |
inp = gr.Textbox(label="Data Input")
|
| 28 |
+
out = gr.Textbox(label="Result")
|
| 29 |
+
btn = gr.Button("Analyze")
|
| 30 |
btn.click(fake_ai, inp, out)
|
| 31 |
|
| 32 |
+
# Link Terminal Lu
|
| 33 |
+
gr.Markdown(f"### [Terminal Access](https://{os.getenv('SPACE_ID','').replace('/', '-')}.hf.space/proxy/8080/)")
|
| 34 |
|
| 35 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|
| 36 |
|