- Implement tests for ImportSuccessModal to verify rendering and functionality. - Update AuthContext to store authentication token in localStorage and manage token state. - Modify useImport hook to capture and expose commit results, preventing unnecessary refetches. - Enhance useCertificates hook to support optional refetch intervals. - Update Dashboard to conditionally poll certificates based on pending status. - Integrate ImportSuccessModal into ImportCaddy for user feedback on import completion. - Adjust Login component to utilize returned token for authentication. - Refactor CrowdSecConfig tests for improved readability and reliability. - Add debug_db.py script for inspecting the SQLite database. - Update integration and test scripts for better configuration and error handling. - Introduce Trivy scan script for vulnerability assessment of Docker images.
24 lines
562 B
Python
24 lines
562 B
Python
import sqlite3
|
|
import os
|
|
|
|
db_path = '/projects/Charon/backend/data/charon.db'
|
|
|
|
if not os.path.exists(db_path):
|
|
print(f"Database not found at {db_path}")
|
|
exit(1)
|
|
|
|
try:
|
|
conn = sqlite3.connect(db_path)
|
|
cursor = conn.cursor()
|
|
|
|
cursor.execute("SELECT id, domain_names, forward_host, forward_port FROM proxy_hosts")
|
|
rows = cursor.fetchall()
|
|
|
|
print("Proxy Hosts:")
|
|
for row in rows:
|
|
print(f"ID: {row[0]}, Domains: {row[1]}, ForwardHost: {row[2]}, Port: {row[3]}")
|
|
|
|
conn.close()
|
|
except Exception as e:
|
|
print(f"Error: {e}")
|