This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/danted.conf | |
logoutput: syslog /var/log/sockd.log | |
internal: eth0 port = 1080 | |
external: eth0 | |
sockmethod: pam.username | |
user.privileged: root |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# implementation of Telegram site authorization checking algorithm | |
# for more information https://core.telegram.org/widgets/login#checking-authorization | |
import collections | |
import hmac | |
import hashlib | |
def check_string(data, token): | |
secret = hashlib.sha256() | |
secret.update(token.encode('utf-8')) |