Per-agent x64dbg session through debugger()/debugger_tools()
Harbor starts the x64dbg-automate MCP server (stdio) on first use and keeps it for the life of the agent's Harbor process; the debuggee is terminated when that process exits. Configured by debugger_command/_path/_temp in [reverse].
This commit is contained in:
1 parent
7ed914ebdb
commit
584fabeb74
5 files changed
+175
-4
No files matched your search
@@ -117,3 +117,22 @@ class GhidraForwarder(unittest.TestCase):
|
||||
with self.assertRaises(HarborError):
|
||||
from harbor.reverse import Ghidra
|
||||
Ghidra({"ghidra_url": "http://127.0.0.1:9/mcp"}).tools()
|
||||
|
||||
|
||||
class DebuggerForwarder(unittest.TestCase):
|
||||
"""debugger() keeps one stdio MCP server per Harbor process and skips its notifications."""
|
||||
|
||||
def test_call_and_error(self):
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from harbor.reverse import Debugger
|
||||
d = Debugger({"debugger_command": [sys.executable, "-B", str(Path(__file__).with_name("fake_stdio_mcp.py"))]})
|
||||
try:
|
||||
self.assertEqual(d.tools()[0]["name"], "echo")
|
||||
self.assertEqual(d.call("echo", {"x": 1}), 'echo {"x": 1}')
|
||||
with self.assertRaises(HarborError):
|
||||
d.call("terminate_session")
|
||||
finally:
|
||||
d.close()
|
||||
with self.assertRaises(HarborError):
|
||||
Debugger({})
|
||||
Reference in new issue
Block a user