MCPcopy Create free account
hub / github.com/GH05TCREW/MetasploitMCP / MockMsfModule

Class MockMsfModule

tests/test_tools_integration.py:74–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72 return True
73
74class MockMsfModule:
75 def __init__(self, fullname):
76 self.fullname = fullname
77 self.options = {}
78 # Create a proper mock for runoptions that supports __setitem__
79 self.runoptions = {}
80 self.missing_required = []
81
82 def __setitem__(self, key, value):
83 self.options[key] = value
84
85 def execute(self, payload=None):
86 return {
87 'job_id': 1234,
88 'uuid': 'test-uuid-123',
89 'error': False
90 }
91
92 def payload_generate(self):
93 return b"test_payload_bytes"
94
95class MockMsfRpcError(Exception):
96 pass

Callers 2

Calls

no outgoing calls

Tested by 2