Skip to content

Instantly share code, notes, and snippets.

View aliqandil's full-sized avatar

AliQ aliqandil

View GitHub Profile
@aliqandil
aliqandil / confirm_telegram_authdata.py
Created July 21, 2019 02:48
Telegram Web Login - Python Confirm User Data
# Python Version of https://gist.github.com/anonymous/6516521b1fb3b464534fbc30ea3573c2
# Similar to: https://gist.github.com/xen/e4bea72487d34caa28c762776cf655a3
# Just using my own style.
# Gets the json output, and returnes a boolean.
import hmac, hashlib
TG_BOT_TOKEN = "XXXXXXX:XXX....."
def confirm_telegram_authdata( data ):
@aliqandil
aliqandil / create_mtproto_proxy_server.py
Last active December 7, 2018 17:58
Pure Python Script to Create an MTProto Proxy server for telegram with a single command. (Command on Line 3)
# To get and run this script, excecute:
#
# sudo bash -c 'python <(curl "https://gist.github.com/aliqandil/a3e172a641286876d23bd93dbcdc0a0a/raw/create_mtproto_proxy_server.py" -sL -N)'
#
from __future__ import print_function
from contextlib import closing
from collections import defaultdict
import socket, json, os, sys, shlex, hashlib, random
#Checking admin rights: