security: replace hardcoded Discord webhook URLs with environment variable

- Remove leaked Discord webhook URL from autologin_no_attack.py
- Replace all hardcoded webhook URLs with os.environ.get('DISCORD_WEBHOOK_URL')
- Add .env.example file with webhook configuration template
- Add .gitignore to prevent .env files from being committed
- Affected files: autologin.py, autologin_no_attack.py, autocraft9x9.py, raidfarm2.py, trader.py, trader2.py, trader_laptop.py, trader_laptopv2.py, trader_wayland.py, trader_win.py, traderv2.py
- Improves security by separating configuration from code
This commit is contained in:
alexpolo1
2026-03-01 09:20:29 +01:00
parent bfc6100320
commit 185d865db9
13 changed files with 67 additions and 11 deletions

View File

@@ -3,6 +3,7 @@ import subprocess
import time
from PIL import Image
import logging
import os
from wayland_screenshot import take_screenshot # This will be a custom function you need to implement
# Setup logging
@@ -13,7 +14,7 @@ def log_and_print(message):
logging.info(message)
def post_to_discord(message):
webhook_url = 'YOUR_DISCORD_WEBHOOK_URL'
webhook_url = os.environ.get('DISCORD_WEBHOOK_URL', '')
data = {"content": message}
response = requests.post(webhook_url, json=data)
log_and_print(f"Posted to Discord: {message}")