Add config_local.py override pattern for sensitive settings
config.py now imports config_local.py at the bottom if present (gitignored). Sensitive defaults (real archive passwords, personal tdl namespace) removed from config.py and documented in config_local.py.example instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
41
config.py
41
config.py
@@ -41,23 +41,7 @@ _DEFAULT_KEYWORDS: list[str] = [
|
||||
|
||||
# Use usernames (without @) or numeric channel IDs (-100xxxxxxxxxx)
|
||||
_DEFAULT_CHANNELS: list[str | int] = [
|
||||
#-1002230225603,
|
||||
#"cloudxlog",
|
||||
##-1001967030016, # daisycloud
|
||||
##"berserklogs", # berserklogs
|
||||
##"BorwitaFreeLogs", # borwita
|
||||
#-1002748707556, # darkcloud
|
||||
#-1001684073398, # BHF Cloud
|
||||
#-1003163621939, # Wich Love from R
|
||||
#-1003611713618, # Khazan Cloud
|
||||
#-1003328682684, # LogsPlanet
|
||||
#-1003204260194, # JDP
|
||||
#-1002828367761, # HesoyamCloud
|
||||
#-1003513974925, # Slurm Logs
|
||||
#-1003599300787, # Arhont Corp
|
||||
#-1002582513379, # OnlyLogs
|
||||
#-1002788333372, # Ickis Cloud
|
||||
-1002643355608, # Cloud URL
|
||||
#"channelName",
|
||||
#-1001234567890, # private channel by ID
|
||||
]
|
||||
|
||||
@@ -122,15 +106,13 @@ MAX_FILE_SIZE = 4 * 1024 * 1024 * 1024 # 4 GB (Telegram Premium max)
|
||||
|
||||
# ─── Archive passwords to try ────────────────────────────────────────────────
|
||||
ARCHIVE_PASSWORDS: list[bytes] = [
|
||||
b"1234",
|
||||
b"0000",
|
||||
b"infected",
|
||||
b"telegram",
|
||||
b"password",
|
||||
b"12345",
|
||||
b"",
|
||||
b"Borwita",
|
||||
b"@WichLoveFromR",
|
||||
b"infected",
|
||||
b"password",
|
||||
b"1234",
|
||||
b"12345",
|
||||
b"0000",
|
||||
b"telegram",
|
||||
]
|
||||
|
||||
# ─── Backfill settings ───────────────────────────────────────────────────────
|
||||
@@ -141,7 +123,7 @@ BACKFILL_LIMIT = 500
|
||||
# Namespace tdl was logged into. Run `tdl login` with no -n flag → namespace
|
||||
# is "default". Run `tdl login -n foo` → namespace is "foo".
|
||||
# Set to None to omit -n entirely (tdl will use "default" anyway).
|
||||
TDL_NAMESPACE: str | None = "ulpmon"
|
||||
TDL_NAMESPACE: str | None = "monitor_session"
|
||||
|
||||
# Parallel chunk workers per file (-t / --threads global flag)
|
||||
TDL_THREADS = 8
|
||||
@@ -156,3 +138,10 @@ TDL_AMOUNT = 4
|
||||
# Whether to use a Telegram takeout session for downloads (lower flood limits).
|
||||
# Takeout sessions are rate-limited differently - good for bulk backfill.
|
||||
TDL_TAKEOUT = True
|
||||
|
||||
# ─── Local overrides (gitignored) ────────────────────────────────────────────
|
||||
# Create config_local.py to override any value above without touching this file.
|
||||
try:
|
||||
from config_local import * # noqa: F401, F403
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user