-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_bn_mcp_bridge.sh
More file actions
executable file
·96 lines (88 loc) · 2.31 KB
/
test_bn_mcp_bridge.sh
File metadata and controls
executable file
·96 lines (88 loc) · 2.31 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/bash
# Test script for Binary Ninja MCP Bridge Integration
echo "=== Testing Binary Ninja MCP Bridge Integration ==="
echo ""
# Test 1: List available Binary Ninja servers
echo "Test 1: Listing available Binary Ninja servers..."
curl -s -X POST http://localhost:8010/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_binary_servers_BN_MCP",
"arguments": {}
}
}' | jq '.'
echo ""
# Test 2: Get binary info from first server
echo "Test 2: Getting binary info from first server..."
curl -s -X POST http://localhost:8010/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "get_binary_info_BN_MCP",
"arguments": {
"binary_id": "port_9009"
}
}
}' | jq '.'
echo ""
# Test 3: List functions from first binary
echo "Test 3: Listing functions from first binary (limit 10)..."
curl -s -X POST http://localhost:8010/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "list_entities_BN_MCP",
"arguments": {
"binary_id": "port_9009",
"kind": "methods",
"limit": 10
}
}
}' | jq '.'
echo ""
# Test 4: List functions from second binary
echo "Test 4: Listing functions from second binary (limit 10)..."
curl -s -X POST http://localhost:8010/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "list_entities_BN_MCP",
"arguments": {
"binary_id": "port_9010",
"kind": "methods",
"limit": 10
}
}
}' | jq '.'
echo ""
# Test 5: Decompile a function from first binary
echo "Test 5: Decompiling 'main' function from first binary..."
curl -s -X POST http://localhost:8010/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 5,
"method": "tools/call",
"params": {
"name": "decompile_function_BN_MCP",
"arguments": {
"binary_id": "port_9009",
"name": "main"
}
}
}' | jq -r '.result.content[0].text' 2>/dev/null || echo "Function not found or error"
echo ""
echo "=== Test Complete ==="