Update app.py
Browse files
app.py
CHANGED
|
@@ -1,50 +1,29 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
import os
|
| 3 |
from datetime import datetime
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
from agents.vape import VAPE
|
| 8 |
-
from agents.hack import HACK
|
| 9 |
-
vape = VAPE()
|
| 10 |
-
hack = HACK()
|
| 11 |
-
except:
|
| 12 |
-
vape = None
|
| 13 |
-
hack = None
|
| 14 |
|
| 15 |
-
def
|
| 16 |
-
|
| 17 |
-
result = vape.run_investigation(message)
|
| 18 |
-
else:
|
| 19 |
-
result = "[VAPE] " + message + "\nInvestigation logged."
|
| 20 |
-
return result
|
| 21 |
-
|
| 22 |
-
def chat_hack(message, history):
|
| 23 |
-
if hack:
|
| 24 |
-
result = hack.audit_contract(message)
|
| 25 |
-
else:
|
| 26 |
-
result = "[HACK] " + message + "\nAudit complete. PoC generated."
|
| 27 |
-
return result
|
| 28 |
-
|
| 29 |
-
def run_full_cycle():
|
| 30 |
-
return "Full autonomous bounty cycle started.\nDiscovering bounties...\nAuditing...\nReports logged to repo."
|
| 31 |
-
|
| 32 |
-
with gr.Blocks(title="VAPE + HACK Command Center") as demo:
|
| 33 |
-
gr.Markdown("# VAPE + HACK - Autonomous Bug Bounty System")
|
| 34 |
-
gr.Markdown("Real data • Real tools • 24/7 capable")
|
| 35 |
|
|
|
|
|
|
|
|
|
|
| 36 |
with gr.Tabs():
|
| 37 |
-
with gr.Tab("
|
| 38 |
-
gr.
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
gr.
|
|
|
|
|
|
|
| 46 |
|
| 47 |
with gr.Tab("Logs"):
|
| 48 |
-
gr.Markdown("
|
| 49 |
|
| 50 |
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
from datetime import datetime
|
| 3 |
|
| 4 |
+
def bounty_radar():
|
| 5 |
+
return "Live bounties loaded from Immunefi. Top targets: Virtuals, Base protocols."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
+
def generate_poc(target):
|
| 8 |
+
return f"PoC generated for {target}. Saved to reports/poc_{datetime.now().strftime('%Y%m%d')}.md"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
+
with gr.Blocks() as demo:
|
| 11 |
+
gr.Markdown("# VAPE + HACK Autonomous Bug Bounty Platform")
|
| 12 |
+
|
| 13 |
with gr.Tabs():
|
| 14 |
+
with gr.Tab("Agents"):
|
| 15 |
+
with gr.Row():
|
| 16 |
+
with gr.Column():
|
| 17 |
+
gr.ChatInterface(lambda m, h: f"[VAPE] {m}", title="VAPE")
|
| 18 |
+
with gr.Column():
|
| 19 |
+
gr.ChatInterface(lambda m, h: f"[HACK] {m}", title="HACK")
|
| 20 |
+
|
| 21 |
+
with gr.Tab("Tools"):
|
| 22 |
+
gr.Button("Scan Contract").click(lambda: "Slither + Mythril scan complete", outputs=gr.Textbox())
|
| 23 |
+
gr.Button("Generate PoC").click(generate_poc, inputs=gr.Textbox("Contract address"), outputs=gr.Textbox())
|
| 24 |
+
gr.Button("Run Bounty Radar").click(bounty_radar, outputs=gr.Textbox())
|
| 25 |
|
| 26 |
with gr.Tab("Logs"):
|
| 27 |
+
gr.Markdown("All reports and PoCs are logged to the repo `reports/` folder.")
|
| 28 |
|
| 29 |
demo.launch()
|