Enthält: - rdp_client.py: RDP Client mit GUI und Monitor-Auswahl - rdp.sh: Bash-basierter RDP Client - teamleader_test/: Network Scanner Fullstack-App - teamleader_test2/: Network Mapper CLI Subdirectories mit eigenem Repo wurden ausgeschlossen. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
44 lines
1.5 KiB
Python
44 lines
1.5 KiB
Python
"""Configuration management for the network scanner application."""
|
|
|
|
from typing import List
|
|
from pydantic_settings import BaseSettings
|
|
from pydantic import Field
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
"""Application settings loaded from environment variables."""
|
|
|
|
# Application
|
|
app_name: str = Field(default="Network Scanner", alias="APP_NAME")
|
|
app_version: str = Field(default="1.0.0", alias="APP_VERSION")
|
|
debug: bool = Field(default=False, alias="DEBUG")
|
|
|
|
# Database
|
|
database_url: str = Field(default="sqlite:///./network_scanner.db", alias="DATABASE_URL")
|
|
|
|
# Scanning
|
|
default_scan_timeout: int = Field(default=3, alias="DEFAULT_SCAN_TIMEOUT")
|
|
max_concurrent_scans: int = Field(default=50, alias="MAX_CONCURRENT_SCANS")
|
|
enable_nmap: bool = Field(default=True, alias="ENABLE_NMAP")
|
|
|
|
# Network
|
|
default_network_range: str = Field(default="192.168.1.0/24", alias="DEFAULT_NETWORK_RANGE")
|
|
scan_private_networks_only: bool = Field(default=True, alias="SCAN_PRIVATE_NETWORKS_ONLY")
|
|
|
|
# API
|
|
api_prefix: str = Field(default="/api", alias="API_PREFIX")
|
|
cors_origins: List[str] = Field(default=["http://localhost:3000"], alias="CORS_ORIGINS")
|
|
|
|
# Logging
|
|
log_level: str = Field(default="INFO", alias="LOG_LEVEL")
|
|
log_file: str = Field(default="logs/network_scanner.log", alias="LOG_FILE")
|
|
|
|
class Config:
|
|
"""Pydantic configuration."""
|
|
env_file = ".env"
|
|
case_sensitive = False
|
|
|
|
|
|
# Global settings instance
|
|
settings = Settings()
|