Spaces:
Configuration error
Configuration error
Update blackgat/dashboard/dashboard.py
Browse files- blackgat/dashboard/dashboard.py +56 -44
blackgat/dashboard/dashboard.py
CHANGED
@@ -1,47 +1,59 @@
|
|
|
|
1 |
import streamlit as st
|
2 |
import requests
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
st.
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
st.
|
30 |
-
|
31 |
-
st.
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
st.
|
36 |
-
|
37 |
-
st.
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# dashboard/app.py
|
2 |
import streamlit as st
|
3 |
import requests
|
4 |
|
5 |
+
API_URL = "http://localhost:8000"
|
6 |
+
|
7 |
+
st.set_page_config(page_title="BlackGat AI", layout="wide")
|
8 |
+
st.title("π§ BlackGat AI β Bug Bounty Automation")
|
9 |
+
|
10 |
+
tool = st.sidebar.selectbox("Choose Agent", ["Scribe", "KillChain", "HeatSeeker", "ReconGPT", "Exploit Suggestion"])
|
11 |
+
|
12 |
+
if tool == "Scribe":
|
13 |
+
st.subheader("π Generate Bug Bounty Report")
|
14 |
+
vuln_type = st.text_input("Vulnerability Type")
|
15 |
+
vuln_url = st.text_input("Vulnerable URL")
|
16 |
+
payload = st.text_input("Payload")
|
17 |
+
impact = st.text_area("Impact")
|
18 |
+
if st.button("Generate"):
|
19 |
+
res = requests.post(f"{API_URL}/scribe", json={
|
20 |
+
"type": vuln_type,
|
21 |
+
"url": vuln_url,
|
22 |
+
"payload": payload,
|
23 |
+
"impact": impact
|
24 |
+
})
|
25 |
+
st.markdown(res.json()["report"])
|
26 |
+
|
27 |
+
elif tool == "KillChain":
|
28 |
+
st.subheader("π Suggest Chained Attack")
|
29 |
+
findings = st.text_area("Paste findings (JSON or summary)")
|
30 |
+
if st.button("Suggest"):
|
31 |
+
res = requests.post(f"{API_URL}/killchain", json={"data": findings})
|
32 |
+
st.markdown(res.json()["chain"])
|
33 |
+
|
34 |
+
elif tool == "HeatSeeker":
|
35 |
+
st.subheader("π‘οΈ Risk Scoring")
|
36 |
+
url = st.text_input("Target URL")
|
37 |
+
status_code = st.number_input("Status Code", min_value=100, max_value=599, value=200)
|
38 |
+
params = st.text_input("Params JSON", '{"user":"admin"}')
|
39 |
+
if st.button("Score"):
|
40 |
+
res = requests.post(f"{API_URL}/score", json={
|
41 |
+
"url": url,
|
42 |
+
"params": eval(params),
|
43 |
+
"status_code": status_code
|
44 |
+
})
|
45 |
+
st.success(f"Score: {res.json()['score']}")
|
46 |
+
|
47 |
+
elif tool == "ReconGPT":
|
48 |
+
st.subheader("π°οΈ Recon Task Generator")
|
49 |
+
prompt = st.text_area("What do you want to find?", "Find all login endpoints.")
|
50 |
+
if st.button("Generate Task"):
|
51 |
+
res = requests.post(f"{API_URL}/recon", json={"prompt": prompt})
|
52 |
+
st.markdown(res.json()["task"])
|
53 |
+
|
54 |
+
elif tool == "Exploit Suggestion":
|
55 |
+
st.subheader("π₯ Attacker Simulation")
|
56 |
+
scenario = st.text_area("Bug scenario or data")
|
57 |
+
if st.button("Get Exploit Advice"):
|
58 |
+
res = requests.post(f"{API_URL}/exploit", json={"data": scenario})
|
59 |
+
st.markdown(res.json()["exploit"])
|