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:
@@ -2,13 +2,14 @@ import subprocess
|
||||
import time
|
||||
import pyautogui
|
||||
import requests
|
||||
import os
|
||||
|
||||
def log_and_print(message):
|
||||
print(message)
|
||||
# Add logging here if needed
|
||||
|
||||
def post_to_discord(message):
|
||||
webhook_url = 'https://discord.com/api/webhooks/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
||||
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}")
|
||||
|
||||
Reference in New Issue
Block a user