add security code

pull/8/head
jon4h 2020-10-11 19:25:42 +02:00
rodzic 8d57704b12
commit 02a8529fc4
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 3E49C5DC24B0ECBA
2 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -10,6 +10,8 @@ whitelisted = [
'buy alert', 'sell alert'
]
sec_code = ''
# Telegram Settings
send_telegram_alerts = False
tg_token = '' # Bot token. Get it from @Botfather

Wyświetl plik

@ -18,7 +18,7 @@ def webhook():
if request.method == 'POST':
data = request.get_data(as_text=True)
for whitelisted in config.whitelisted:
if whitelisted.lower() in data.lower():
if whitelisted.lower() in data.lower() and config.sec_code in data:
print('[✓]', timestamp, 'Alert Received & Sent!\n>', data)
send_alert(data)
return 'Sent alert', 200