Add full application source
This commit is contained in:
85
config.py
Normal file
85
config.py
Normal file
@@ -0,0 +1,85 @@
|
||||
"""
|
||||
Configuration and constants for the Facebook Recovery System.
|
||||
"""
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
# Paths
|
||||
BASE_DIR = Path(__file__).parent
|
||||
DATA_DIR = BASE_DIR / "data"
|
||||
ASSETS_DIR = BASE_DIR / "assets"
|
||||
|
||||
# Ensure data directory exists
|
||||
DATA_DIR.mkdir(exist_ok=True)
|
||||
|
||||
# Proxy source settings (free public sources — no API key needed)
|
||||
PROXIFLY_API_KEY = ""
|
||||
PROXIFLY_API_URL = ""
|
||||
PROXIFLY_FALLBACK_URL = ""
|
||||
|
||||
# Facebook
|
||||
FACEBOOK_LOGIN_URL = "https://m.facebook.com/login.php"
|
||||
FACEBOOK_BASE_URL = "https://m.facebook.com"
|
||||
|
||||
# Proxy Settings
|
||||
MAX_PROXIES = 2000
|
||||
PROXY_TEST_TIMEOUT = 10 # seconds
|
||||
PROXY_TEST_URL = "http://httpbin.org/ip"
|
||||
PROXY_REFRESH_INTERVAL = 300 # seconds (5 min)
|
||||
|
||||
# Attack Settings
|
||||
DEFAULT_DELAY_MIN = 0.5 # seconds
|
||||
DEFAULT_DELAY_MAX = 2.0 # seconds
|
||||
MAX_CONCURRENT_WORKERS = 3 # parallel attack threads
|
||||
PROXY_ROTATION_EVERY = 1 # rotate proxy every N attempts (1 = each attempt)
|
||||
REQUEST_TIMEOUT = 20 # seconds per HTTP request
|
||||
|
||||
# Proxy Testing
|
||||
PROXY_TEST_CONCURRENCY = 100 # concurrent proxy health-check connections
|
||||
|
||||
# Password Generation
|
||||
DEFAULT_MIN_LENGTH = 6
|
||||
DEFAULT_MAX_LENGTH = 32
|
||||
GPU_THRESHOLD = 50_000 # use GPU when combinations exceed this
|
||||
|
||||
# File Paths
|
||||
PASSWORDS_FILE = DATA_DIR / "passwords.txt"
|
||||
PROXIES_FILE = DATA_DIR / "proxies.txt"
|
||||
VALID_PROXIES_FILE = DATA_DIR / "valid_proxies.txt"
|
||||
ATTEMPT_LOG_FILE = DATA_DIR / "attempt_log.csv"
|
||||
OLLAMA_CONFIG_FILE = BASE_DIR / "config_ollama.json"
|
||||
|
||||
DEFAULT_OLLAMA_CONFIG = {
|
||||
"ollama_host": "http://localhost:11434",
|
||||
"model": "",
|
||||
"timeout": 60,
|
||||
"temperature": 0.1,
|
||||
"top_p": 0.9,
|
||||
"max_tokens": 512,
|
||||
"prompt_template": "",
|
||||
"browser_engine": "Playwright",
|
||||
"headless": False,
|
||||
"viewport": "1280x720",
|
||||
"mouse_delay_ms": 50,
|
||||
"retry_limit": 3,
|
||||
}
|
||||
|
||||
# GUI Theme Colors
|
||||
THEME = {
|
||||
"bg_dark": "#0a0a0f",
|
||||
"bg_medium": "#12121a",
|
||||
"bg_light": "#1a1a2e",
|
||||
"primary": "#00f0ff",
|
||||
"secondary": "#ff00aa",
|
||||
"tertiary": "#7700ff",
|
||||
"text_primary": "#e0e0ff",
|
||||
"text_secondary": "#8888aa",
|
||||
"text_dim": "#555577",
|
||||
"success": "#00ff88",
|
||||
"warning": "#ffaa00",
|
||||
"error": "#ff3355",
|
||||
"border": "#2a2a4a",
|
||||
"glow_cyan": "#00f0ff33",
|
||||
"glow_pink": "#ff00aa33",
|
||||
"glow_purple": "#7700ff33",
|
||||
}
|
||||
Reference in New Issue
Block a user