|
import altair as alt |
|
import numpy as np |
|
import pandas as pd |
|
import streamlit as st |
|
|
|
st.set_page_config(layout="wide", page_title="AI Recon Visualizer") |
|
st.title("π§ AI Recon Visualizer") |
|
st.markdown(""" |
|
This interactive spiral chart simulates discovered targets during an automated reconnaissance workflow. |
|
Each point represents a discovered service or subdomain, with random weights simulating risk or exposure levels. |
|
""") |
|
|
|
|
|
num_points = st.slider("π Number of discovered endpoints", 10, 10000, 800) |
|
num_turns = st.slider("π Spiral depth (rotations)", 1, 300, 40) |
|
|
|
|
|
indices = np.linspace(0, 1, num_points) |
|
theta = 2 * np.pi * num_turns * indices |
|
radius = indices |
|
x = radius * np.cos(theta) |
|
y = radius * np.sin(theta) |
|
|
|
|
|
df = pd.DataFrame({ |
|
"x": x, |
|
"y": y, |
|
"target_score": indices, |
|
"risk": np.random.randn(num_points), |
|
"endpoint": [f"host{i}.recon.local" for i in range(num_points)] |
|
}) |
|
|
|
|
|
chart = alt.Chart(df, height=700, width=700).mark_point(filled=True).encode( |
|
x=alt.X("x", axis=None), |
|
y=alt.Y("y", axis=None), |
|
color=alt.Color("target_score", legend=None, scale=alt.Scale(scheme="viridis")), |
|
size=alt.Size("risk", legend=None, scale=alt.Scale(range=[10, 150])), |
|
tooltip=["endpoint", "risk", "target_score"] |
|
).interactive() |
|
|
|
st.altair_chart(chart, use_container_width=True) |