-
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
·80 lines (72 loc) · 2.33 KB
/
test_binary_comparison.sh
File metadata and controls
executable file
·80 lines (72 loc) · 2.33 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
# Test script for Binary Ninja comparison functionality
echo "=== Testing Binary Ninja MCP Integration ==="
echo ""
# Test 1: Discover Binary Ninja servers
echo "Test 1: Discovering Binary Ninja servers..."
curl -s http://localhost:9009/health 2>/dev/null && echo "✓ Server on port 9009 is running" || echo "✗ Server on port 9009 not found"
curl -s http://localhost:9010/health 2>/dev/null && echo "✓ Server on port 9010 is running" || echo "✗ Server on port 9010 not found"
echo ""
# Test 2: Get binary info from first server
echo "Test 2: Getting binary info from port 9009..."
curl -s -X POST http://localhost:9009/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_binary_status_BN_MCP",
"arguments": {}
}
}' | jq -r '.result.content[0].text' 2>/dev/null || echo "Failed to get binary info"
echo ""
# Test 3: Get binary info from second server
echo "Test 3: Getting binary info from port 9010..."
curl -s -X POST http://localhost:9010/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_binary_status_BN_MCP",
"arguments": {}
}
}' | jq -r '.result.content[0].text' 2>/dev/null || echo "Failed to get binary info"
echo ""
# Test 4: List functions from first binary
echo "Test 4: Listing functions from port 9009 (first 10)..."
curl -s -X POST http://localhost:9009/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_entities_BN_MCP",
"arguments": {
"kind": "methods",
"limit": 10
}
}
}' | jq -r '.result.content[0].text' 2>/dev/null || echo "Failed to list functions"
echo ""
# Test 5: List functions from second binary
echo "Test 5: Listing functions from port 9010 (first 10)..."
curl -s -X POST http://localhost:9010/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_entities_BN_MCP",
"arguments": {
"kind": "methods",
"limit": 10
}
}
}' | jq -r '.result.content[0].text' 2>/dev/null || echo "Failed to list functions"
echo ""
echo "=== Test Complete ==="