deleted poopoo
This commit is contained in:
18
.claude/hooks/protect_secrets.py
Normal file
18
.claude/hooks/protect_secrets.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# .claude/hooks/protect_secrets.py
|
||||||
|
import json, sys
|
||||||
|
|
||||||
|
BLOCKED = [".env", ".session", ".session-journal", "config.py"]
|
||||||
|
|
||||||
|
data = json.load(sys.stdin)
|
||||||
|
tool = data.get("tool_name", "")
|
||||||
|
inp = data.get("tool_input", {})
|
||||||
|
|
||||||
|
# Get the file path depending on which tool fired
|
||||||
|
path = inp.get("file_path") or inp.get("path") or ""
|
||||||
|
|
||||||
|
if any(path.endswith(b) for b in BLOCKED):
|
||||||
|
print(f"Blocked: {tool} on {path}", file=sys.stderr)
|
||||||
|
sys.exit(2)
|
||||||
|
|
||||||
|
sys.exit(0)
|
||||||
18
.claude/settings.json
Normal file
18
.claude/settings.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"permissions": {
|
||||||
|
"deny": ["Read(.env)"]
|
||||||
|
},
|
||||||
|
"hooks": {
|
||||||
|
"PreToolUse": [
|
||||||
|
{
|
||||||
|
"matcher": "Read|Edit|Write",
|
||||||
|
"hooks": [
|
||||||
|
{
|
||||||
|
"type": "command",
|
||||||
|
"command": "python3 .claude/hooks/protect_secrets.py"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -3,7 +3,11 @@
|
|||||||
*.session-journal
|
*.session-journal
|
||||||
bot_session*
|
bot_session*
|
||||||
|
|
||||||
# Data — keep the folder, ignore contents
|
# logs: keep the folder, ignore contents
|
||||||
|
logs/*
|
||||||
|
|
||||||
|
# Data: keep the folder, ignore contents
|
||||||
|
data/*
|
||||||
data/hits.db
|
data/hits.db
|
||||||
data/hits.txt
|
data/hits.txt
|
||||||
data/hits.csv
|
data/hits.csv
|
||||||
|
|||||||
@@ -1,54 +0,0 @@
|
|||||||
2026-04-02 00:45:48,909 [INFO] utils.database: Database ready: data/hits.db
|
|
||||||
2026-04-02 00:45:49,119 [INFO] telethon.crypto.aes: libssl detected, it will be used for encryption
|
|
||||||
2026-04-02 00:45:49,156 [INFO] utils.database: Database ready: data/hits.db
|
|
||||||
2026-04-02 00:45:49,159 [INFO] tui.app: [bot] Connecting bot_client...
|
|
||||||
2026-04-02 00:45:49,159 [INFO] telethon.network.mtprotosender: Connecting to 149.154.175.59:443/TcpFull...
|
|
||||||
2026-04-02 00:45:49,203 [INFO] tui.app: [bus] EvStatus: Starting — 12 channel(s), 2 pattern(s)
|
|
||||||
2026-04-02 00:45:49,281 [INFO] telethon.network.mtprotosender: Connection to 149.154.175.59:443/TcpFull complete!
|
|
||||||
2026-04-02 00:45:49,900 [INFO] tui.app: [bot] bot_client connected, authorizing...
|
|
||||||
2026-04-02 00:45:49,901 [INFO] tui.app: [bot] bot_client ready
|
|
||||||
2026-04-02 00:45:49,901 [INFO] tui.app: [bot] Connecting user_client...
|
|
||||||
2026-04-02 00:45:49,901 [INFO] telethon.network.mtprotosender: Connecting to 149.154.175.59:443/TcpFull...
|
|
||||||
2026-04-02 00:45:49,908 [INFO] __main__: Cleaning up tmp/...
|
|
||||||
2026-04-02 00:54:16,429 [INFO] utils.database: Database ready: data/hits.db
|
|
||||||
2026-04-02 00:54:16,638 [INFO] telethon.crypto.aes: libssl detected, it will be used for encryption
|
|
||||||
2026-04-02 00:54:16,666 [ERROR] tui.app: [bot-thread] Unhandled exception: cannot import name 'HITS_CSV' from 'config' (/home/anti/Tools/sj/telegrammer/config.py)
|
|
||||||
Traceback (most recent call last):
|
|
||||||
File "/home/anti/Tools/sj/telegrammer/tui/app.py", line 848, in _run_bot_thread
|
|
||||||
loop.run_until_complete(self._bot_main())
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
|
|
||||||
File "/usr/lib64/python3.14/asyncio/base_events.py", line 719, in run_until_complete
|
|
||||||
return future.result()
|
|
||||||
~~~~~~~~~~~~~^^
|
|
||||||
File "/home/anti/Tools/sj/telegrammer/tui/app.py", line 865, in _bot_main
|
|
||||||
from core.notifier import send_status
|
|
||||||
File "/home/anti/Tools/sj/telegrammer/core/notifier.py", line 22, in <module>
|
|
||||||
from config import HITS_FILE, HITS_CSV, NOTIFY_CHAT_ID
|
|
||||||
ImportError: cannot import name 'HITS_CSV' from 'config' (/home/anti/Tools/sj/telegrammer/config.py)
|
|
||||||
2026-04-02 00:54:16,716 [INFO] tui.app: [bus] EvStatus: Bot thread crashed: cannot import name 'HITS_CSV' from 'config' (/home/anti/Tools/sj/telegrammer/config.py)
|
|
||||||
2026-04-02 00:54:22,624 [INFO] __main__: Cleaning up tmp/...
|
|
||||||
2026-04-02 00:54:34,773 [INFO] utils.database: Database ready: data/hits.db
|
|
||||||
2026-04-02 00:54:34,983 [INFO] telethon.crypto.aes: libssl detected, it will be used for encryption
|
|
||||||
2026-04-02 00:54:35,015 [INFO] utils.database: Database ready: data/hits.db
|
|
||||||
2026-04-02 00:54:35,015 [INFO] tui.app: [bot] Connecting bot_client...
|
|
||||||
2026-04-02 00:54:35,015 [INFO] telethon.network.mtprotosender: Connecting to 149.154.175.59:443/TcpFull...
|
|
||||||
2026-04-02 00:54:35,063 [INFO] tui.app: [bus] EvStatus: Starting — 12 channel(s), 2 pattern(s)
|
|
||||||
2026-04-02 00:54:35,120 [INFO] telethon.network.mtprotosender: Connection to 149.154.175.59:443/TcpFull complete!
|
|
||||||
2026-04-02 00:54:35,698 [INFO] tui.app: [bot] bot_client connected, authorizing...
|
|
||||||
2026-04-02 00:54:35,698 [INFO] tui.app: [bot] bot_client ready
|
|
||||||
2026-04-02 00:54:35,698 [INFO] tui.app: [bot] Connecting user_client...
|
|
||||||
2026-04-02 00:54:35,698 [INFO] telethon.network.mtprotosender: Connecting to 149.154.175.59:443/TcpFull...
|
|
||||||
2026-04-02 00:54:35,810 [INFO] telethon.network.mtprotosender: Connection to 149.154.175.59:443/TcpFull complete!
|
|
||||||
2026-04-02 00:54:36,420 [INFO] tui.app: [bot] user_client connected, checking auth...
|
|
||||||
2026-04-02 00:54:36,420 [INFO] tui.app: [bot] user_client ready
|
|
||||||
2026-04-02 00:54:36,563 [INFO] tui.app: [bus] EvStatus: Connected as 4n (@clp_c)
|
|
||||||
2026-04-02 00:54:36,653 [INFO] core.scraper: Warming entity cache (fetching dialogs)...
|
|
||||||
2026-04-02 00:54:38,437 [INFO] core.scraper: Entity cache ready.
|
|
||||||
2026-04-02 00:54:38,437 [INFO] tui.app: [bot] Handler registered for 12 channel(s)
|
|
||||||
2026-04-02 00:54:38,437 [INFO] core.scraper: [Backfill] Starting for 12 channel(s)...
|
|
||||||
2026-04-02 00:54:38,437 [INFO] core.scraper: [Backfill] Scanning history: cloudxlog (last 500 messages)
|
|
||||||
2026-04-02 00:54:38,463 [INFO] tui.app: [bus] EvStatus: Watching 12 channel(s)
|
|
||||||
2026-04-02 00:54:38,463 [INFO] tui.app: [bus] EvStatus: Live listener active
|
|
||||||
2026-04-02 00:54:38,585 [INFO] core.scraper: [Batch] 4 file(s): @cloud t13.txt, @cloud t12.txt, @cloud t11.txt, @cloud t10.txt
|
|
||||||
2026-04-02 00:54:38,585 [INFO] core.tdl_downloader: [tdl] Batch (4 files): @cloud t13.txt, @cloud t12.txt, @cloud t11.txt, @cloud t10.txt
|
|
||||||
2026-04-02 00:54:40,248 [INFO] __main__: Cleaning up tmp/...
|
|
||||||
Reference in New Issue
Block a user