feat: add vuln reproduction and detection scripts

This commit is contained in:
Renato Britto
2026-02-27 00:01:55 -03:00
committed by LORDBABUINO
parent 1f7ecf321c
commit fb5381d7b1
11 changed files with 3425 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
# run_all.sh — Setup custom signet and run all 12 vulnerability tests
set -euo pipefail
cd "$(dirname "$0")"
echo "╔══════════════════════════════════════════════════════════════╗"
echo "║ Bitcoin Privacy Vulnerability Suite — Full Run ║"
echo "╚══════════════════════════════════════════════════════════════╝"
echo ""
# Step 1: Setup signet (if not already running)
if bitcoin-cli -signet getblockchaininfo &>/dev/null; then
HEIGHT=$(bitcoin-cli -signet getblockcount)
echo "✓ Custom Signet already running at block $HEIGHT"
# Check wallets exist
WALLETS=$(bitcoin-cli -signet listwallets 2>/dev/null)
if echo "$WALLETS" | grep -q "alice"; then
echo "✓ Wallets already created"
else
echo "⚠ Wallets not found. Running setup..."
bash setup_signet.sh
fi
else
echo "Starting custom Signet setup..."
bash setup_signet.sh
fi
echo ""
echo "Running vulnerability tests..."
echo ""
# Step 2: Run all tests
python3 test_vulnerabilities.py "$@"