mirror of
https://github.com/bellingcat/telegram-phone-number-checker.git
synced 2026-06-11 12:58:29 +03:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c9cb2ab99 | ||
|
|
dd6108a449 | ||
|
|
a649ce5ab6 | ||
|
|
2b7dea31fd | ||
|
|
2a873a3733 |
@@ -1,10 +1,11 @@
|
||||
# telegram-phone-number-checker
|
||||
|
||||
Python tool/script toc heck if phone numbers are connected to Telegram accounts.
|
||||
Python tool/script to check if phone numbers are connected to Telegram accounts. Retrieving username, name, and IDs where available.
|
||||
|
||||
## Installation
|
||||
|
||||
[](https://pypi.org/project/telegram-phone-number-checker/)
|
||||
[
|
||||
](https://pypi.org/project/telegram-phone-number-checker/)
|
||||
|
||||
You can install this tool directly from the [official pypi release](https://pypi.org/project/telegram-phone-number-checker/).
|
||||
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
[tool.poetry]
|
||||
name = "telegram-phone-number-checker"
|
||||
version = "1.0.0"
|
||||
version = "1.0.2"
|
||||
description = "Check if phone numbers are connected to Telegram accounts."
|
||||
authors = ["Bellingcat"]
|
||||
license = "MIT"
|
||||
readme = "README.md"
|
||||
repository = "https://github.com/bellingcat/telegram-phone-number-checker"
|
||||
|
||||
[tool.poetry.urls]
|
||||
"Bug Tracker" = "https://github.com/bellingcat/telegram-phone-number-checker/issues"
|
||||
|
||||
[tool.poetry.scripts]
|
||||
telegram-phone-number-checker = "telegram_phone_number_checker.main:main_entrypoint"
|
||||
|
||||
@@ -46,7 +46,7 @@ def validate_users(client, phone_numbers):
|
||||
The function uses the get_api_response function to first check if the user exists and if it does, then it returns the first user name and the last user name.
|
||||
'''
|
||||
if not phone_numbers or not len(phone_numbers):
|
||||
phone_numbers = click.prompt('Enter the phone numbers to check, separated by commas')
|
||||
phone_numbers = input('Enter the phone numbers to check, separated by commas: ')
|
||||
result = {}
|
||||
phones = [p.strip() for p in phone_numbers.split(",")]
|
||||
try:
|
||||
@@ -62,9 +62,9 @@ def validate_users(client, phone_numbers):
|
||||
def login(api_id, api_hash, phone_number):
|
||||
"""Create a telethon session or reuse existing one"""
|
||||
print('Logging in...', end="", flush=True)
|
||||
API_ID = api_id or os.getenv('API_ID') or click.prompt('Enter your API ID')
|
||||
API_HASH = api_hash or os.getenv('API_HASH') or click.prompt('Enter your API HASH')
|
||||
PHONE_NUMBER = phone_number or os.getenv('PHONE_NUMBER') or click.prompt('Enter your phone number')
|
||||
API_ID = api_id or os.getenv('API_ID') or input('Enter your API ID: ')
|
||||
API_HASH = api_hash or os.getenv('API_HASH') or input('Enter your API HASH: ')
|
||||
PHONE_NUMBER = phone_number or os.getenv('PHONE_NUMBER') or input('Enter your phone number: ')
|
||||
client = TelegramClient(PHONE_NUMBER, API_ID, API_HASH)
|
||||
client.connect()
|
||||
if not client.is_user_authorized():
|
||||
|
||||
Reference in New Issue
Block a user