6f3884e832
- remove the original Logger - use Rex::Logging with helper methods (dlog, ilog, etc.) - add `sanitize` configuration option - create Sanitizing, JsonFlatfile and JsonStream sinks for JSON logging format - minor updates in apply_default (Loader) - update the re-authentication logic (fix a specific usecase) - add a Rack middleware that logs MCP HTTP request/response - use Rex::Socket::Tcp instead of TcpSocket - update the ensure_rpc_available for better validation - use around_request instead of the deprecated SDK instrumentation for logging - update and add specs
34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
# Metasploit RPC API connection (MessagePack)
|
|
msf_api:
|
|
type: messagepack
|
|
host: localhost
|
|
port: 55553
|
|
ssl: true
|
|
endpoint: /api/
|
|
user: msfuser
|
|
password: CHANGEME
|
|
auto_start_rpc: true # Automatically start the RPC server if not running (default: true)
|
|
|
|
# MCP server configuration
|
|
mcp:
|
|
transport: stdio # stdio (default) or http
|
|
# MCP server network configuration (for HTTP transport only)
|
|
host: localhost # Host to bind to (default: localhost)
|
|
port: 3000 # Port to listen on (default: 3000)
|
|
|
|
# Rate limiting (optional - defaults shown)
|
|
rate_limit:
|
|
enabled: true
|
|
requests_per_minute: 60
|
|
# If the `burst_size` is greater than `requests_per_minute`, a user will be allowed to exceed the rate limit temporarily.
|
|
# For example, with `requests_per_minute=5` and `burst_size=10`, a user could make 10 requests in a short period,
|
|
# but then would be limited to 5 requests per minute thereafter.
|
|
burst_size: 10
|
|
|
|
# Logging (optional - defaults shown)
|
|
logging:
|
|
enabled: false
|
|
level: INFO # DEBUG, INFO, WARN, ERROR
|
|
log_file: ~/.msf4/logs/msfmcp.log
|
|
sanitize: true
|