Aqso commited on
Commit
eee2989
·
verified ·
1 Parent(s): d7da99f

Update shield.py

Browse files
Files changed (1) hide show
  1. shield.py +10 -9
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 (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",
@@ -17,19 +18,19 @@ def start_all():
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
 
 
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