Update main.py

This commit is contained in:
ilyastar9999
2025-12-03 10:47:25 +03:00
parent e8213d7e9f
commit 8af9a1f04d

View File

@@ -194,14 +194,14 @@ async def http_polling_listener():
while True: while True:
try: try:
async with aiohttp.ClientSession() as session: async with aiohttp.ClientSession() as session:
# ForcAD API endpoints that should return JSON # ForcAD API endpoints for actual attack/flag data (not attack_data which is exploit credentials)
# Try different possible paths # Try different possible paths
endpoints_to_try = [ endpoints_to_try = [
('/api/client/attack_data', 'GET'), ('/api/flag/submit', 'GET'), # Flag submission history
('/api/client/attacks', 'GET'), ('/api/client/stolen_flags', 'GET'), # Stolen flags
('/api/flag/info', 'GET'), ('/api/client/flag_stats', 'GET'), # Flag statistics
('/api/info', 'GET'), ('/api/game/status', 'GET'), # Game status with flags
('/api/game_state', 'GET'), ('/api/service/status', 'GET'), # Service status
] ]
data_found = False data_found = False
@@ -527,11 +527,11 @@ async def debug_scoreboard():
# Test HTTP endpoints - both HTML and API paths # Test HTTP endpoints - both HTML and API paths
base_url = SCOREBOARD_API_URL.rstrip('/api') base_url = SCOREBOARD_API_URL.rstrip('/api')
endpoints = [ endpoints = [
"/api/client/attack_data", "/api/flag/submit",
"/api/client/attacks", "/api/client/stolen_flags",
"/api/flag/info", "/api/client/flag_stats",
"/api/info", "/api/game/status",
"/api/game_state", "/api/service/status",
"/api/attacks", "/api/attacks",
"/api/scoreboard", "/api/scoreboard",
"/api/teams", "/api/teams",