Sync from GitHub via hub-sync
Browse files- agents/token_scan.py +153 -0
- data/dashboard.json +0 -13
- docs/index.html +38 -9
- intel/scans/README.md +5 -0
- web/index.html +0 -275
agents/token_scan.py
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
VAPE token scan-and-log — the agent-side twin of the dashboard Hunt console.
|
| 3 |
+
|
| 4 |
+
Runs the SAME real scan (GoPlus token_security + DexScreener liquidity) as the
|
| 5 |
+
browser console, but from Python, and LOGS the verdict into intel/ so agent-run
|
| 6 |
+
hunts are persisted and auditable. Keyless, stdlib-only, compute-free (just HTTP).
|
| 7 |
+
|
| 8 |
+
Usage:
|
| 9 |
+
python -m agents.token_scan <0x_address> [chain_id]
|
| 10 |
+
# chain_id default 8453 (Base); 1=Eth, 42161=Arbitrum
|
| 11 |
+
Writes:
|
| 12 |
+
intel/scans/scan-<chain>-<addr8>-<UTC>.md (human report)
|
| 13 |
+
intel/scans/scans.jsonl (append-only machine log)
|
| 14 |
+
"""
|
| 15 |
+
import json
|
| 16 |
+
import os
|
| 17 |
+
import re
|
| 18 |
+
import sys
|
| 19 |
+
import urllib.request
|
| 20 |
+
from datetime import datetime, timezone
|
| 21 |
+
|
| 22 |
+
UA = {"User-Agent": "VAPE-PrivateEye/1.0 (+https://github.com/jUXTAPOSITION1/V.A.P.E)"}
|
| 23 |
+
SCAN_DIR = os.path.join(os.path.dirname(os.path.dirname(__file__)), "intel", "scans")
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
def _now():
|
| 27 |
+
return datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
def _get(url, timeout=15):
|
| 31 |
+
try:
|
| 32 |
+
with urllib.request.urlopen(urllib.request.Request(url, headers=UA), timeout=timeout) as r:
|
| 33 |
+
return json.loads(r.read().decode())
|
| 34 |
+
except Exception as e:
|
| 35 |
+
return {"_error": str(e)}
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
def scan(address, chain_id=8453):
|
| 39 |
+
"""Return a structured verdict dict from real GoPlus + DexScreener data."""
|
| 40 |
+
address = address.strip()
|
| 41 |
+
if not re.fullmatch(r"0x[a-fA-F0-9]{40}", address):
|
| 42 |
+
return {"error": "invalid_address", "address": address}
|
| 43 |
+
|
| 44 |
+
gp_raw = _get(f"https://api.gopluslabs.io/api/v1/token_security/{chain_id}"
|
| 45 |
+
f"?contract_addresses={address}")
|
| 46 |
+
ds_raw = _get(f"https://api.dexscreener.com/latest/dex/tokens/{address}")
|
| 47 |
+
|
| 48 |
+
gp = {}
|
| 49 |
+
if isinstance(gp_raw, dict) and gp_raw.get("result"):
|
| 50 |
+
vals = list(gp_raw["result"].values())
|
| 51 |
+
gp = vals[0] if vals else {}
|
| 52 |
+
|
| 53 |
+
pairs = ds_raw.get("pairs") or [] if isinstance(ds_raw, dict) else []
|
| 54 |
+
liquidity_usd = round(sum((p.get("liquidity") or {}).get("usd", 0) for p in pairs), 2)
|
| 55 |
+
|
| 56 |
+
def f(x):
|
| 57 |
+
try:
|
| 58 |
+
return float(x)
|
| 59 |
+
except Exception:
|
| 60 |
+
return None
|
| 61 |
+
|
| 62 |
+
flags = []
|
| 63 |
+
if gp.get("is_honeypot") == "1":
|
| 64 |
+
flags.append("HONEYPOT")
|
| 65 |
+
if (f(gp.get("buy_tax")) or 0) > 0.10:
|
| 66 |
+
flags.append(f"buy_tax {float(gp['buy_tax'])*100:.0f}%")
|
| 67 |
+
if (f(gp.get("sell_tax")) or 0) > 0.10:
|
| 68 |
+
flags.append(f"sell_tax {float(gp['sell_tax'])*100:.0f}%")
|
| 69 |
+
if gp.get("is_mintable") == "1":
|
| 70 |
+
flags.append("mintable")
|
| 71 |
+
owner = gp.get("owner_address") or ""
|
| 72 |
+
if owner and owner != "0x0000000000000000000000000000000000000000":
|
| 73 |
+
flags.append("owner_not_renounced")
|
| 74 |
+
if gp.get("is_proxy") == "1":
|
| 75 |
+
flags.append("proxy")
|
| 76 |
+
if 0 < liquidity_usd < 10000:
|
| 77 |
+
flags.append("low_liquidity")
|
| 78 |
+
if gp.get("cannot_sell_all") == "1":
|
| 79 |
+
flags.append("cannot_sell_all")
|
| 80 |
+
if gp.get("transfer_pausable") == "1":
|
| 81 |
+
flags.append("transfer_pausable")
|
| 82 |
+
|
| 83 |
+
if gp.get("is_honeypot") == "1":
|
| 84 |
+
verdict = "REJECT"
|
| 85 |
+
elif len(flags) >= 2:
|
| 86 |
+
verdict = "CAUTION"
|
| 87 |
+
else:
|
| 88 |
+
verdict = "PROCEED"
|
| 89 |
+
|
| 90 |
+
return {
|
| 91 |
+
"ts": _now(),
|
| 92 |
+
"chain_id": chain_id,
|
| 93 |
+
"address": address,
|
| 94 |
+
"name": gp.get("token_name"),
|
| 95 |
+
"symbol": gp.get("token_symbol"),
|
| 96 |
+
"verdict": verdict,
|
| 97 |
+
"flags": flags,
|
| 98 |
+
"holder_count": gp.get("holder_count"),
|
| 99 |
+
"liquidity_usd": liquidity_usd,
|
| 100 |
+
"is_honeypot": gp.get("is_honeypot"),
|
| 101 |
+
"buy_tax": gp.get("buy_tax"),
|
| 102 |
+
"sell_tax": gp.get("sell_tax"),
|
| 103 |
+
"owner_address": owner or None,
|
| 104 |
+
"top_pair_dex": (pairs[0].get("dexId") if pairs else None),
|
| 105 |
+
"source": "goplus+dexscreener",
|
| 106 |
+
"data_error": gp_raw.get("_error") or ds_raw.get("_error"),
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
def log_scan(result):
|
| 111 |
+
"""Persist a scan result to intel/scans/ (md report + jsonl line)."""
|
| 112 |
+
if result.get("error"):
|
| 113 |
+
return None
|
| 114 |
+
os.makedirs(SCAN_DIR, exist_ok=True)
|
| 115 |
+
addr8 = result["address"][:8]
|
| 116 |
+
stamp = result["ts"].replace(":", "").replace("-", "")
|
| 117 |
+
md_path = os.path.join(SCAN_DIR, f"scan-{result['chain_id']}-{addr8}-{stamp}.md")
|
| 118 |
+
title = f"{result.get('name') or 'Unknown'} ({result.get('symbol') or '?'})"
|
| 119 |
+
with open(md_path, "w") as f:
|
| 120 |
+
f.write(f"# VAPE Token Scan — {title}\n\n")
|
| 121 |
+
f.write(f"- **Verdict:** {result['verdict']}\n")
|
| 122 |
+
f.write(f"- **Address:** `{result['address']}` (chain {result['chain_id']})\n")
|
| 123 |
+
f.write(f"- **Scanned:** {result['ts']}\n")
|
| 124 |
+
f.write(f"- **Holders:** {result.get('holder_count')}\n")
|
| 125 |
+
f.write(f"- **Liquidity (USD):** {result.get('liquidity_usd')}\n")
|
| 126 |
+
f.write(f"- **Honeypot:** {result.get('is_honeypot')}\n")
|
| 127 |
+
f.write(f"- **Buy/Sell tax:** {result.get('buy_tax')} / {result.get('sell_tax')}\n")
|
| 128 |
+
f.write(f"- **Owner:** {result.get('owner_address')}\n")
|
| 129 |
+
f.write(f"- **Flags:** {', '.join(result['flags']) if result['flags'] else 'none'}\n\n")
|
| 130 |
+
f.write("_Real data: GoPlus token_security + DexScreener. Not investment advice._\n")
|
| 131 |
+
with open(os.path.join(SCAN_DIR, "scans.jsonl"), "a") as f:
|
| 132 |
+
f.write(json.dumps(result) + "\n")
|
| 133 |
+
return md_path
|
| 134 |
+
|
| 135 |
+
|
| 136 |
+
def main():
|
| 137 |
+
if len(sys.argv) < 2:
|
| 138 |
+
print("usage: python -m agents.token_scan <0x_address> [chain_id]")
|
| 139 |
+
sys.exit(2)
|
| 140 |
+
addr = sys.argv[1]
|
| 141 |
+
chain = int(sys.argv[2]) if len(sys.argv) > 2 else 8453
|
| 142 |
+
res = scan(addr, chain)
|
| 143 |
+
if res.get("error"):
|
| 144 |
+
print(json.dumps(res))
|
| 145 |
+
sys.exit(1)
|
| 146 |
+
path = log_scan(res)
|
| 147 |
+
print(json.dumps(res, indent=2))
|
| 148 |
+
if path:
|
| 149 |
+
print(f"\nlogged -> {path}")
|
| 150 |
+
|
| 151 |
+
|
| 152 |
+
if __name__ == "__main__":
|
| 153 |
+
main()
|
data/dashboard.json
DELETED
|
@@ -1,13 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"bounties": [
|
| 3 |
-
{"name": "Virtuals Protocol", "chain": "Base", "max_bounty": "$250k"},
|
| 4 |
-
{"name": "Base Ecosystem", "chain": "Base", "max_bounty": "$100k"},
|
| 5 |
-
{"name": "Other Base Projects", "chain": "Base", "max_bounty": "TBD"}
|
| 6 |
-
],
|
| 7 |
-
"activity": [
|
| 8 |
-
"Red Team analysis completed",
|
| 9 |
-
"Bounty report generated",
|
| 10 |
-
"Self-PR proposal created"
|
| 11 |
-
],
|
| 12 |
-
"last_updated": "Just now"
|
| 13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docs/index.html
CHANGED
|
@@ -305,22 +305,22 @@
|
|
| 305 |
try {
|
| 306 |
const list = await (await fetch('https://api.llama.fi/protocols')).json();
|
| 307 |
const base = list.filter(p => (p.chains||[]).includes('Base') && p.category!=='CEX' && (p.chainTvls?.Base>0))
|
| 308 |
-
.map(p => ({name:p.name, tvl:p.chainTvls.Base, c1:p.change_1d, cat:p.category}))
|
| 309 |
.sort((a,b)=>b.tvl-a.tvl).slice(0,8);
|
| 310 |
el.innerHTML = base.map((p,i)=>`
|
| 311 |
-
<div class="card-h glass rounded-xl px-4 py-3 flex items-center
|
| 312 |
-
<
|
| 313 |
-
|
| 314 |
-
<div class="
|
| 315 |
-
|
| 316 |
-
<div class="text-xs text-zinc-500">${p.cat||''}</div>
|
| 317 |
-
</div>
|
| 318 |
</div>
|
| 319 |
-
<div class="
|
|
|
|
| 320 |
<div class="stat font-display">${fmtUsd(p.tvl)}</div>
|
| 321 |
<div class="text-xs">${pct(p.c1)}</div>
|
| 322 |
</div>
|
| 323 |
</div>`).join('');
|
|
|
|
| 324 |
// anomaly flags (rule-based, client-side)
|
| 325 |
const flags = [];
|
| 326 |
if (typeof this._tvl==='number') {} // chain-level change not in v2/chains; protocol-level below
|
|
@@ -332,6 +332,35 @@
|
|
| 332 |
} catch(e){ el.innerHTML = `<div class="text-amber-400 text-sm">Live protocol fetch unavailable.</div>`; }
|
| 333 |
},
|
| 334 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 335 |
async bounties() {
|
| 336 |
const el = document.getElementById('bounties');
|
| 337 |
try {
|
|
|
|
| 305 |
try {
|
| 306 |
const list = await (await fetch('https://api.llama.fi/protocols')).json();
|
| 307 |
const base = list.filter(p => (p.chains||[]).includes('Base') && p.category!=='CEX' && (p.chainTvls?.Base>0))
|
| 308 |
+
.map(p => ({name:p.name, slug:p.slug, tvl:p.chainTvls.Base, c1:p.change_1d, cat:p.category}))
|
| 309 |
.sort((a,b)=>b.tvl-a.tvl).slice(0,8);
|
| 310 |
el.innerHTML = base.map((p,i)=>`
|
| 311 |
+
<div class="card-h glass rounded-xl px-4 py-3 flex items-center gap-3">
|
| 312 |
+
<span class="text-zinc-600 text-sm w-5 shrink-0">${i+1}</span>
|
| 313 |
+
<div class="min-w-0 flex-1">
|
| 314 |
+
<div class="font-semibold truncate">${p.name}</div>
|
| 315 |
+
<div class="text-xs text-zinc-500">${p.cat||''}</div>
|
|
|
|
|
|
|
| 316 |
</div>
|
| 317 |
+
<div class="spark shrink-0" data-slug="${p.slug||''}" style="width:72px;height:26px"></div>
|
| 318 |
+
<div class="text-right shrink-0 w-24">
|
| 319 |
<div class="stat font-display">${fmtUsd(p.tvl)}</div>
|
| 320 |
<div class="text-xs">${pct(p.c1)}</div>
|
| 321 |
</div>
|
| 322 |
</div>`).join('');
|
| 323 |
+
this._sparklines();
|
| 324 |
// anomaly flags (rule-based, client-side)
|
| 325 |
const flags = [];
|
| 326 |
if (typeof this._tvl==='number') {} // chain-level change not in v2/chains; protocol-level below
|
|
|
|
| 332 |
} catch(e){ el.innerHTML = `<div class="text-amber-400 text-sm">Live protocol fetch unavailable.</div>`; }
|
| 333 |
},
|
| 334 |
|
| 335 |
+
_sparkCache: {},
|
| 336 |
+
async _sparklines() {
|
| 337 |
+
const nodes = [...document.querySelectorAll('.spark[data-slug]')].filter(n=>n.dataset.slug && !n._done);
|
| 338 |
+
for (const n of nodes) {
|
| 339 |
+
n._done = true;
|
| 340 |
+
const slug = n.dataset.slug;
|
| 341 |
+
try {
|
| 342 |
+
let series = this._sparkCache[slug];
|
| 343 |
+
if (!series) {
|
| 344 |
+
const d = await (await fetch(`https://api.llama.fi/protocol/${slug}`)).json();
|
| 345 |
+
const ct = d.chainTvls?.Base?.tvl || [];
|
| 346 |
+
series = ct.slice(-14).map(x=>x.totalLiquidityUSD||0);
|
| 347 |
+
this._sparkCache[slug] = series;
|
| 348 |
+
}
|
| 349 |
+
if (series.length < 2) continue;
|
| 350 |
+
const min=Math.min(...series), max=Math.max(...series), W=72, H=26, pad=2, rng=(max-min)||1;
|
| 351 |
+
const pts = series.map((v,i)=>{
|
| 352 |
+
const x = pad + i*(W-2*pad)/(series.length-1);
|
| 353 |
+
const y = H-pad - ((v-min)/rng)*(H-2*pad);
|
| 354 |
+
return `${x.toFixed(1)},${y.toFixed(1)}`;
|
| 355 |
+
}).join(' ');
|
| 356 |
+
const up = series[series.length-1] >= series[0];
|
| 357 |
+
const col = up ? '#34d399' : '#fb7185';
|
| 358 |
+
n.innerHTML = `<svg width="${W}" height="${H}" viewBox="0 0 ${W} ${H}"><polyline fill="none" stroke="${col}" stroke-width="1.5" points="${pts}"/></svg>`;
|
| 359 |
+
await new Promise(r=>setTimeout(r,120));
|
| 360 |
+
} catch(e){ /* leave blank on failure */ }
|
| 361 |
+
}
|
| 362 |
+
},
|
| 363 |
+
|
| 364 |
async bounties() {
|
| 365 |
const el = document.getElementById('bounties');
|
| 366 |
try {
|
intel/scans/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Token Scans
|
| 2 |
+
|
| 3 |
+
Real-data token safety scans logged by `agents/token_scan.py` (GoPlus + DexScreener).
|
| 4 |
+
The agent-side twin of the dashboard's Hunt console. Each scan writes a `scan-*.md`
|
| 5 |
+
report and appends to `scans.jsonl`. Real data only — verdicts: PROCEED / CAUTION / REJECT.
|
web/index.html
DELETED
|
@@ -1,275 +0,0 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="en">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8">
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>VAPE • Hack Bounty Command Center</title>
|
| 7 |
-
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
| 9 |
-
<style>
|
| 10 |
-
body { font-family: 'Inter', system-ui, sans-serif; }
|
| 11 |
-
.font-display { font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 600; }
|
| 12 |
-
.glass { background: rgba(255,255,255,0.05); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.1); }
|
| 13 |
-
.neon { text-shadow: 0 0 10px rgba(0, 255, 157, 0.5); }
|
| 14 |
-
.bounty-card { transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
|
| 15 |
-
.bounty-card:hover { transform: translateY(-3px); }
|
| 16 |
-
</style>
|
| 17 |
-
</head>
|
| 18 |
-
<body class="bg-zinc-950 text-zinc-200">
|
| 19 |
-
<!-- Navbar -->
|
| 20 |
-
<nav class="border-b border-white/10 bg-zinc-950/90 backdrop-blur-xl sticky top-0 z-50">
|
| 21 |
-
<div class="max-w-screen-2xl mx-auto px-8">
|
| 22 |
-
<div class="flex items-center justify-between h-20">
|
| 23 |
-
<div class="flex items-center gap-x-3">
|
| 24 |
-
<div class="flex items-center gap-x-3">
|
| 25 |
-
<div class="w-10 h-10 bg-emerald-500 rounded-2xl flex items-center justify-center">
|
| 26 |
-
<i class="fa-solid fa-shield-halved text-black text-3xl"></i>
|
| 27 |
-
</div>
|
| 28 |
-
<div>
|
| 29 |
-
<span class="font-display text-3xl tracking-tighter">VAPE</span>
|
| 30 |
-
<span class="font-display text-3xl tracking-tighter text-emerald-400">HACK</span>
|
| 31 |
-
</div>
|
| 32 |
-
</div>
|
| 33 |
-
<div class="px-3 py-1 text-xs font-mono bg-emerald-950 text-emerald-400 rounded-full border border-emerald-900 flex items-center gap-x-2">
|
| 34 |
-
<div class="w-2 h-2 bg-emerald-400 rounded-full animate-pulse"></div>
|
| 35 |
-
<span class="text-xs font-medium">LIVE REAL DATA</span>
|
| 36 |
-
</div>
|
| 37 |
-
</div>
|
| 38 |
-
|
| 39 |
-
<div class="flex items-center gap-x-3">
|
| 40 |
-
<button onclick="connectAgent()"
|
| 41 |
-
class="px-5 py-2.5 bg-white text-black rounded-3xl text-sm font-semibold flex items-center gap-x-2 hover:bg-zinc-100 transition-all">
|
| 42 |
-
<i class="fa-solid fa-plug"></i>
|
| 43 |
-
<span>Connect VAPE / HACK</span>
|
| 44 |
-
</button>
|
| 45 |
-
</div>
|
| 46 |
-
</div>
|
| 47 |
-
</div>
|
| 48 |
-
</nav>
|
| 49 |
-
|
| 50 |
-
<div class="max-w-screen-2xl mx-auto px-8 pt-8 pb-16">
|
| 51 |
-
<!-- Header -->
|
| 52 |
-
<div class="mb-8">
|
| 53 |
-
<h1 class="font-display text-6xl tracking-tighter font-semibold">Bug Bounty Command Center</h1>
|
| 54 |
-
<p class="text-2xl text-zinc-400 mt-1">Real data • Open source • Built for autonomous agents</p>
|
| 55 |
-
</div>
|
| 56 |
-
|
| 57 |
-
<!-- Stats -->
|
| 58 |
-
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-8">
|
| 59 |
-
<div class="glass rounded-3xl p-6">
|
| 60 |
-
<div class="text-sm text-zinc-400">Active Immunefi Programs</div>
|
| 61 |
-
<div class="text-5xl font-semibold mt-1" id="active-count">Loading...</div>
|
| 62 |
-
</div>
|
| 63 |
-
<div class="glass rounded-3xl p-6">
|
| 64 |
-
<div class="text-sm text-zinc-400">Total Bounties (Real)</div>
|
| 65 |
-
<div class="text-5xl font-semibold mt-1 text-emerald-400" id="total-bounties">Loading...</div>
|
| 66 |
-
</div>
|
| 67 |
-
<div class="glass rounded-3xl p-6">
|
| 68 |
-
<div class="text-sm text-zinc-400">High/Critical</div>
|
| 69 |
-
<div class="text-5xl font-semibold mt-1" id="high-critical">Loading...</div>
|
| 70 |
-
</div>
|
| 71 |
-
<div class="glass rounded-3xl p-6">
|
| 72 |
-
<div class="text-sm text-zinc-400">Last Updated</div>
|
| 73 |
-
<div class="text-xl font-mono mt-1 text-emerald-400" id="last-updated">Just now</div>
|
| 74 |
-
</div>
|
| 75 |
-
</div>
|
| 76 |
-
|
| 77 |
-
<!-- Main Content -->
|
| 78 |
-
<div class="grid grid-cols-1 xl:grid-cols-12 gap-6">
|
| 79 |
-
|
| 80 |
-
<!-- Real Bounty Radar -->
|
| 81 |
-
<div class="xl:col-span-7 glass rounded-3xl p-8">
|
| 82 |
-
<div class="flex items-center justify-between mb-6">
|
| 83 |
-
<div class="flex items-center gap-x-3">
|
| 84 |
-
<i class="fa-solid fa-radar text-3xl text-emerald-400"></i>
|
| 85 |
-
<div>
|
| 86 |
-
<div class="font-semibold text-2xl">Live Bounty Radar</div>
|
| 87 |
-
<div class="text-sm text-emerald-400">Real data from Immunefi (public open source)</div>
|
| 88 |
-
</div>
|
| 89 |
-
</div>
|
| 90 |
-
<button onclick="fetchRealBounties()"
|
| 91 |
-
class="px-5 py-2 text-sm bg-white/10 hover:bg-white/15 rounded-2xl flex items-center gap-x-2 transition-colors">
|
| 92 |
-
<i class="fa-solid fa-sync"></i>
|
| 93 |
-
<span>Refresh Real Data</span>
|
| 94 |
-
</button>
|
| 95 |
-
</div>
|
| 96 |
-
|
| 97 |
-
<div id="bounty-list" class="space-y-3 max-h-[480px] overflow-auto pr-2">
|
| 98 |
-
<!-- Populated by real data -->
|
| 99 |
-
</div>
|
| 100 |
-
</div>
|
| 101 |
-
|
| 102 |
-
<!-- Agent API + Scanner -->
|
| 103 |
-
<div class="xl:col-span-5 space-y-6">
|
| 104 |
-
<!-- Agent API Console -->
|
| 105 |
-
<div class="glass rounded-3xl p-8">
|
| 106 |
-
<div class="flex items-center gap-x-3 mb-5">
|
| 107 |
-
<i class="fa-solid fa-terminal text-3xl text-emerald-400"></i>
|
| 108 |
-
<div class="font-semibold text-2xl">Agent API Console</div>
|
| 109 |
-
</div>
|
| 110 |
-
|
| 111 |
-
<div class="bg-zinc-950 rounded-2xl p-4 text-sm font-mono mb-4">
|
| 112 |
-
<div class="text-emerald-400">$ POST /api/scan</div>
|
| 113 |
-
<div class="text-zinc-400">{"contract": "0x...", "agent": "HACK"}</div>
|
| 114 |
-
</div>
|
| 115 |
-
|
| 116 |
-
<div class="grid grid-cols-2 gap-3">
|
| 117 |
-
<button onclick="simulateAgentAction('scan')"
|
| 118 |
-
class="px-5 py-3 bg-emerald-600 hover:bg-emerald-500 text-black font-semibold rounded-3xl flex items-center justify-center gap-x-2">
|
| 119 |
-
<i class="fa-solid fa-play"></i>
|
| 120 |
-
<span>HACK Scan</span>
|
| 121 |
-
</button>
|
| 122 |
-
<button onclick="simulateAgentAction('report')"
|
| 123 |
-
class="px-5 py-3 bg-white/10 hover:bg-white/15 rounded-3xl flex items-center justify-center gap-x-2">
|
| 124 |
-
<span>Submit Finding</span>
|
| 125 |
-
</button>
|
| 126 |
-
</div>
|
| 127 |
-
</div>
|
| 128 |
-
|
| 129 |
-
<!-- Scanner -->
|
| 130 |
-
<div class="glass rounded-3xl p-8">
|
| 131 |
-
<div class="font-semibold text-2xl mb-4 flex items-center gap-x-3">
|
| 132 |
-
<i class="fa-solid fa-search text-emerald-400"></i>
|
| 133 |
-
Smart Contract Scanner
|
| 134 |
-
</div>
|
| 135 |
-
|
| 136 |
-
<input id="contract-address" type="text" placeholder="0x contract address"
|
| 137 |
-
class="w-full bg-zinc-900 border border-white/10 rounded-3xl px-6 py-4 mb-4 text-lg focus:outline-none focus:border-emerald-500">
|
| 138 |
-
|
| 139 |
-
<button onclick="runRealScanner()"
|
| 140 |
-
class="w-full px-8 py-3.5 bg-emerald-600 hover:bg-emerald-500 transition-all text-black font-bold rounded-3xl flex items-center justify-center gap-x-3">
|
| 141 |
-
<span>SCAN WITH REAL TOOLS</span>
|
| 142 |
-
</button>
|
| 143 |
-
|
| 144 |
-
<div id="scan-results" class="mt-5 hidden"></div>
|
| 145 |
-
</div>
|
| 146 |
-
</div>
|
| 147 |
-
</div>
|
| 148 |
-
</div>
|
| 149 |
-
|
| 150 |
-
<script>
|
| 151 |
-
// Real Immunefi data fetch
|
| 152 |
-
async function fetchRealBounties() {
|
| 153 |
-
const container = document.getElementById('bounty-list');
|
| 154 |
-
container.innerHTML = `<div class="flex items-center gap-x-3 text-emerald-400 p-4"><i class="fa-solid fa-spinner fa-spin"></i> <span>Fetching real Immunefi data...</span></div>`;
|
| 155 |
-
|
| 156 |
-
try {
|
| 157 |
-
const response = await fetch('https://raw.githubusercontent.com/infosec-us-team/Immunefi-Bug-Bounty-Programs-Unofficial/main/projects.json');
|
| 158 |
-
const data = await response.json();
|
| 159 |
-
|
| 160 |
-
// Take top 8 active programs
|
| 161 |
-
const activePrograms = data.slice(0, 8);
|
| 162 |
-
|
| 163 |
-
container.innerHTML = '';
|
| 164 |
-
|
| 165 |
-
activePrograms.forEach(program => {
|
| 166 |
-
const div = document.createElement('div');
|
| 167 |
-
div.className = `bounty-card glass rounded-2xl p-5 border border-white/10 flex justify-between items-center`;
|
| 168 |
-
|
| 169 |
-
div.innerHTML = `
|
| 170 |
-
<div>
|
| 171 |
-
<div class="font-semibold text-xl">${program.name || 'Unknown Project'}</div>
|
| 172 |
-
<div class="text-sm text-zinc-400">${program.chain || 'Multi-chain'} • ${program.assets?.length || 0} assets in scope</div>
|
| 173 |
-
</div>
|
| 174 |
-
|
| 175 |
-
<div class="text-right">
|
| 176 |
-
<div class="font-mono text-2xl font-semibold text-emerald-400">${program.max_bounty || 'N/A'}</div>
|
| 177 |
-
<div class="text-xs text-zinc-400">${program.status || 'Active'}</div>
|
| 178 |
-
|
| 179 |
-
<button onclick="claimForAgent('${program.name}')"
|
| 180 |
-
class="mt-2 px-4 py-1.5 text-xs bg-emerald-600 hover:bg-emerald-500 text-black rounded-2xl font-semibold">
|
| 181 |
-
Claim for HACK
|
| 182 |
-
</button>
|
| 183 |
-
</div>
|
| 184 |
-
`;
|
| 185 |
-
container.appendChild(div);
|
| 186 |
-
});
|
| 187 |
-
|
| 188 |
-
// Update stats
|
| 189 |
-
document.getElementById('active-count').textContent = data.length;
|
| 190 |
-
document.getElementById('total-bounties').textContent = data.length;
|
| 191 |
-
document.getElementById('high-critical').textContent = Math.floor(data.length * 0.35);
|
| 192 |
-
document.getElementById('last-updated').textContent = new Date().toLocaleTimeString();
|
| 193 |
-
|
| 194 |
-
} catch (error) {
|
| 195 |
-
container.innerHTML = `<div class="text-red-400 p-4">Failed to load real data. Using fallback.</div>`;
|
| 196 |
-
console.error(error);
|
| 197 |
-
}
|
| 198 |
-
}
|
| 199 |
-
|
| 200 |
-
function claimForAgent(projectName) {
|
| 201 |
-
showToast(`Bounty claimed for HACK agent: ${projectName}`);
|
| 202 |
-
setTimeout(() => {
|
| 203 |
-
showToast("HACK agent started analysis...");
|
| 204 |
-
}, 1200);
|
| 205 |
-
}
|
| 206 |
-
|
| 207 |
-
async function runRealScanner() {
|
| 208 |
-
const address = document.getElementById('contract-address').value.trim();
|
| 209 |
-
if (!address) return alert("Enter a contract address");
|
| 210 |
-
|
| 211 |
-
const results = document.getElementById('scan-results');
|
| 212 |
-
results.classList.remove('hidden');
|
| 213 |
-
results.innerHTML = `<div class="p-4 bg-zinc-900 rounded-2xl"><i class="fa-solid fa-spinner fa-spin mr-2"></i> Scanning with open-source tools (Slither + verified sources)...</div>`;
|
| 214 |
-
|
| 215 |
-
// Simulate real analysis (in production connect to real API)
|
| 216 |
-
setTimeout(() => {
|
| 217 |
-
results.innerHTML = `
|
| 218 |
-
<div class="bg-emerald-950/30 border border-emerald-900 rounded-2xl p-6">
|
| 219 |
-
<div class="flex justify-between">
|
| 220 |
-
<div>
|
| 221 |
-
<div class="font-semibold">Scan Complete — Real Analysis</div>
|
| 222 |
-
<div class="text-sm text-zinc-400">${address}</div>
|
| 223 |
-
</div>
|
| 224 |
-
<div class="px-3 py-1 bg-red-500/20 text-red-400 rounded-xl text-xs">High Risk</div>
|
| 225 |
-
</div>
|
| 226 |
-
|
| 227 |
-
<div class="mt-4 text-sm">
|
| 228 |
-
<div>• Reentrancy risk detected (Slither verified pattern)</div>
|
| 229 |
-
<div>• Access control issue flagged</div>
|
| 230 |
-
</div>
|
| 231 |
-
|
| 232 |
-
<button onclick="generatePoC()" class="mt-5 px-6 py-2.5 bg-emerald-600 text-black font-semibold rounded-2xl text-sm">
|
| 233 |
-
Generate PoC Report
|
| 234 |
-
</button>
|
| 235 |
-
</div>
|
| 236 |
-
`;
|
| 237 |
-
}, 1800);
|
| 238 |
-
}
|
| 239 |
-
|
| 240 |
-
function generatePoC() {
|
| 241 |
-
alert("PoC generated using verified open-source templates. Ready for agent submission.");
|
| 242 |
-
}
|
| 243 |
-
|
| 244 |
-
function simulateAgentAction(type) {
|
| 245 |
-
if (type === 'scan') {
|
| 246 |
-
showToast("HACK agent initiated deep scan using real data sources");
|
| 247 |
-
} else {
|
| 248 |
-
showToast("Finding submitted to on-chain registry via ACP");
|
| 249 |
-
}
|
| 250 |
-
}
|
| 251 |
-
|
| 252 |
-
function connectAgent() {
|
| 253 |
-
showToast("VAPE + HACK agents connected to real data pipeline");
|
| 254 |
-
}
|
| 255 |
-
|
| 256 |
-
function showToast(msg) {
|
| 257 |
-
const toast = document.createElement('div');
|
| 258 |
-
toast.className = `fixed bottom-8 right-8 px-6 py-4 bg-zinc-900 border border-white/10 rounded-2xl text-sm z-[200]`;
|
| 259 |
-
toast.textContent = msg;
|
| 260 |
-
document.body.appendChild(toast);
|
| 261 |
-
setTimeout(() => toast.remove(), 2800);
|
| 262 |
-
}
|
| 263 |
-
|
| 264 |
-
// Initialize with real data
|
| 265 |
-
function init() {
|
| 266 |
-
fetchRealBounties();
|
| 267 |
-
|
| 268 |
-
// Auto refresh every 5 minutes
|
| 269 |
-
setInterval(fetchRealBounties, 300000);
|
| 270 |
-
}
|
| 271 |
-
|
| 272 |
-
window.onload = init;
|
| 273 |
-
</script>
|
| 274 |
-
</body>
|
| 275 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|