Skip to content

Instantly share code, notes, and snippets.

@X-Gorn
X-Gorn / get_channels.py
Created July 13, 2024 08:57
Get All Channel of a User.
from pyrogram import Client, enums
bot = Client()
async def get_channels():
async for dialog in bot.get_dialogs():
if dialog.chat.type == enums.ChatType.CHANNEL:
yield dialog
async for dialog in get_channels():
@X-Gorn
X-Gorn / acefile-bypasser.user.js
Last active July 13, 2024 08:28
AceFile auto redirect to drive link. drive link will automatically copied to the clipboard.
// ==UserScript==
// @name Acefile Bypasser
// @namespace https://xgorn.is-a.dev/
// @downloadURL https://gist.github.com/X-Gorn/eb4de448e08509d414f34b55b5551720/raw/acefile-bypasser.user.js
// @updateURL https://gist.github.com/X-Gorn/eb4de448e08509d414f34b55b5551720/raw/acefile-bypasser.user.js
// @version 1.0.1
// @description AceFile auto redirect to drive link. drive link will automatically copied to the clipboard.
// @author Noid Darkstar
// @include /^https?:\/\/acefile.co\/(?:f|player)\/\w+(?:\/[-_\w]+)?/
// @icon https://www.google.com/s2/favicons?sz=64&domain=acefile.co
@X-Gorn
X-Gorn / unPacker.js
Created July 8, 2024 05:15
unPack javascript eval
//////////////////////////////////////////
// Un pack the code from the /packer/ //
// By matthew@matthewfl.com //
// http://matthewfl.com/unPacker.html //
//////////////////////////////////////////
// version 1.2
function unPack (code) {
function indent (code) {
@X-Gorn
X-Gorn / install-apktool.sh
Last active June 18, 2024 16:24 — forked from bmaupin/install-apktool.sh
Install apktool in Linux
# ⚠ NOTE: if you're using the latest version of ubuntu, now you can just do:
# sudo apt install apktool
# Get latest version from https://bitbucket.org/iBotPeaches/apktool/downloads
export apktool_version=2.9.3
sudo -E sh -c 'wget https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_$apktool_version.jar -O /usr/local/bin/apktool.jar'
sudo chmod +r /usr/local/bin/apktool.jar
sudo sh -c 'wget https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool -O /usr/local/bin/apktool'
sudo chmod +x /usr/local/bin/apktool
@X-Gorn
X-Gorn / deleteAllMessages.py
Last active May 29, 2024 08:09
Pyrogram Delete All Messages in a Chat with Double Clients.
import asyncio
from pyrogram import Client
from pyrogram.errors import FloodWait
chat_id = -100123456789
api_hash = 'abc'
api_id = 123
string_session1 = ''
string_session2 = ''
@X-Gorn
X-Gorn / generate_gdtoken.py
Created August 6, 2023 04:27
Generate Google Drive Token
import requests
client_id = '123456-abcdefgh.apps.googleusercontent.com'
client_secret = 'abcdefgh'
auth_link = 'https://accounts.google.com/o/oauth2/auth?client_id={client_id}&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&access_type=offline&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&approval_prompt=auto'.format(client_id=client_id)
code = input('Get and paste your auth code from: {auth_link}\n\n'.format(auth_link=auth_link))
x = requests.post(
@X-Gorn
X-Gorn / chrome2requests.py
Last active August 21, 2022 01:38 — forked from scraperdragon/chrome2requests.py
Convert Chrome headers to Python's Requests dictionary
dict([['-'.join([x.capitalize() for x in h.partition(':')[0].strip().split('-')]), h.partition(':')[2].strip()] for h in rawheaders.split('\n')])