-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
62 lines (48 loc) · 1.68 KB
/
Copy pathconfig.py
File metadata and controls
62 lines (48 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
"""
Application configuration settings
"""
import os
from pathlib import Path
from dotenv import load_dotenv
load_dotenv()
# Base directory — always relative to this file, regardless of working directory
BASE_DIR = Path(__file__).resolve().parent
# Initial access vectors
EGG = b'\x55\x55\x55\x55'
TXT_FILE_PATH = os.path.join(BASE_DIR, "implant_output", "url.txt")
# Map / uploads configuration
MAP_DIR = os.path.join(BASE_DIR, "map")
UPLOADS_DIR = os.path.join(BASE_DIR, "uploads")
MAP_FILE_PATH = os.path.join(MAP_DIR, "map.json")
# File paths
IMPLANT_OUTPUT_DIR = os.path.join(BASE_DIR, "implant_output")
# Application settings
DEBUG = os.getenv("DEBUG", "False").lower() == "true"
TESTING = os.getenv("TESTING", "False").lower() == "true"
# Database settings
DATABASE_URL = os.getenv("DATABASE_URL", "mongodb://localhost:27017")
DATABASE_NAME = os.getenv("DATABASE_NAME", "sliver_api")
# JWT settings — env var name matches example.env / .env
SECRET_KEY = os.getenv("JWT_SECRET_KEY", "your-secret-key-here")
ALGORITHM = os.getenv("JWT_ALGORITHM", "HS256")
ACCESS_TOKEN_EXPIRE_MINUTES = int(os.getenv("ACCESS_TOKEN_EXPIRE_MINUTES", "30"))
# GeoIP settings
GEOIP_DB_PATH = os.path.join(BASE_DIR, "GeoLite2-City.mmdb")
# API settings
BACKEND_URL = os.getenv("BACKEND_URL", "http://localhost:8000")
# Rate limiting
RATE_LIMIT_REQUESTS_PER_MINUTE = int(os.getenv("RATE_LIMIT_REQUESTS_PER_MINUTE", "60"))
# CORS settings
CORS_ORIGINS = os.getenv("CORS_ORIGINS", "*").split(",")
# Ignored endpoints for tracking
IGNORED_ENDPOINTS = {
"/api/user/activity",
"/api/user/page-visit",
"/auth/verify",
"/health",
"/sessions",
"/jobs",
"/connected",
"/operators",
"/users",
}