-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_binary_comparison.sh
More file actions
executable file
·44 lines (33 loc) · 1.24 KB
/
test_binary_comparison.sh
File metadata and controls
executable file
·44 lines (33 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
set -euo pipefail
# Smoke test for the preferred Binary Ninja Personal-license pathway:
# Binary Ninja GUI plugin servers on ports 9009+, consumed by Rust tooling.
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$ROOT_DIR"
echo "=== Testing Binary Ninja GUI Plugin Integration ==="
echo ""
echo "Test 1: Rust CLI discovery"
cargo run --quiet -p smart-diff-cli -- binja servers --format text || true
echo ""
for port in 9009 9010; do
base_url="http://localhost:${port}"
echo "Test: direct plugin REST probe on ${base_url}"
if ! curl -fsS "${base_url}/status" >/tmp/smartdiff-binja-status.json 2>/dev/null; then
echo " - no server on ${port}"
echo ""
continue
fi
echo " - status:"
jq '.' /tmp/smartdiff-binja-status.json
echo " - binary info:"
curl -fsS "${base_url}/binary/info" | jq '.'
echo " - first 10 functions:"
curl -fsS "${base_url}/functions?offset=0&limit=10" | jq '.functions'
echo " - Rust CLI first 10 functions:"
cargo run --quiet -p smart-diff-cli -- binja functions "port_${port}" --limit 10 || true
echo ""
done
echo "Optional decompile smoke test:"
echo " cargo run --quiet -p smart-diff-cli -- binja decompile port_9009 main"
echo ""
echo "=== Test Complete ==="