Skip to content

Instantly share code, notes, and snippets.

@okineadev
Created April 26, 2025 17:38
Show Gist options
  • Save okineadev/8c7f1d140622ba92b10cb2fa585230e1 to your computer and use it in GitHub Desktop.
Save okineadev/8c7f1d140622ba92b10cb2fa585230e1 to your computer and use it in GitHub Desktop.
๐Ÿ‘ฎโ€โ™‚๏ธ Telegram moderators finder script
# /// script
# dependencies = [
# "kurigram==2.2.*",
# "uvloop",
# ]
# ///
import asyncio
import uvloop
from pyrogram.client import Client
from pyrogram.types import Chat
from pyrogram.errors import PhoneNotOccupied, BadMsgNotification
from pyrogram.raw.functions.contacts.resolve_phone import ResolvePhone
uvloop.install()
# Your credentials from https://my.telegram.org
api_id = 'your_api_id_here'
api_hash = 'api_hash_here'
# Function to check if an account exists for the phone number
async def check_number(app: Client, phone_number: str) -> None:
try:
users = await app.invoke(ResolvePhone(
phone=phone_number
))
print(users.users) # type: ignore
user: Chat = users.users[0] # type: ignore
print(f"Number {phone_number} registered as {user.first_name or ''}{(' ' + user.last_name) if user.last_name else ''}")
except (PhoneNotOccupied, BadMsgNotification):
pass
# Generate a list of numbers in the ranges
def generate_phone_numbers():
numbers = []
for i in range(100):
numbers.append(f"999444444{str(i).zfill(2)}")
numbers.append(f"999444555{str(i).zfill(2)}")
numbers.sort()
return numbers
# Main asynchronous function to start the check
async def main():
phone_numbers = generate_phone_numbers()
async with Client("telegram_mods_finder", api_id, api_hash) as app:
tasks = [check_number(app, number) for number in phone_numbers]
await asyncio.gather(*tasks) # Run all requests asynchronously
if __name__ == "__main__":
asyncio.run(main())

This is a script to search for registered test numbers +999 (which were originally only available only on the test server), which were mysteriously found on the Telegram production server on March 10, 2025 (https://t.me/durovleaks/950)

How they got there and how it happens is most likely known to a small circle of people, as it turned out, these accounts were used for testing (reviews of Android Telegram clients in the Play Market (https://t.me/durovleaks/964?comment=648603)) and by moderators (https://t.me/durovleaks/959), some of the accounts were 100% confirmed moderators (they were noticed in hundreds of suspicious channels, one even in 700, which clearly indicates their involvement in moderation)

Features of such accounts:

One guy with this number got so fed up that his account was deleted for an unknown reason - https://t.me/durovleaks/1005

Message https://t.me/durovleaks/1002:

๐Ÿ‡ฎ๐Ÿ‡ณ ๐Ÿ—ฃ For those who don't understand: a moderator is not allowed to disclose their role. Therefore, as soon as their role becomes known, they must delete their account.

I'm not sure about this, I've seen some new Telegram moderators in chats and they haven't disappeared anywhere.


Currently, only one user has the +999 number open - Lily (probably the same woman in the chat list from the videos about new Telegram features) - https://t.me/+99944455502

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment