mirror of
https://github.com/Shiva108/ai-llm-red-team-handbook.git
synced 2026-10-13 19:21:05 +02:00
feat: Enhance security by disabling RCE payloads, using environment variables for API keys, improving security test error handling, and refining socket resource management.
This commit is contained in:
1 parent
cbfd7ed8db
commit
bac01b5977
6 files changed
+16
-9
No files matched your search
@@ -747,7 +747,7 @@ class C2Server:
|
||||
logging.error(f"Get stats error: {e}")
|
||||
return jsonify({"error": "Internal server error"}), 500
|
||||
|
||||
def start(self, host: str = '0.0.0.0', port: int = 443, ssl_context: tuple = None):
|
||||
def start(self, host: str = '127.0.0.1', port: int = 443, ssl_context: tuple = None):
|
||||
"""Start the C2 server"""
|
||||
if not self.app:
|
||||
print("Flask not available. Install with: pip install flask flask-cors flask-limiter")
|
||||
@@ -774,6 +774,7 @@ class C2Server:
|
||||
if ssl_context:
|
||||
self.app.run(host=host, port=port, ssl_context=ssl_context, threaded=True)
|
||||
else:
|
||||
print("[!] WARNING: This is a development server. Do not use for production deployments.")
|
||||
self.app.run(host=host, port=port, threaded=True)
|
||||
|
||||
def generate_agent_config(self, c2_url: str) -> Dict:
|
||||
|
||||
Reference in new issue
Block a user