Welcome to Telepathy, an OSINT toolkit for scraping Telegram data to help investigate shady goings on. Currently, the tool is limited to scraping only the sources of forwarded messages. Its capabilities will be increased over time.
- Install from source
git clone https://github.com/jordanwildon/Telepathy.git pip install -r requirements.txt
Register for and obtain your Telegram API details from my.telegram.org.
Navigate to the installation directory and run setup.py, this will walk you through the Telegram API login and prepare the toolkit with your details.
Upon installation completion, you will be able to launch forwards.py. On first use, it will ask you for an authorization code that will be sent to your Telegram account.
This tool scrapes the names of chats that have had messages forwarded into your target groups and automatically save these in an edgelist named edgelist.csv. It can then scrape forwards from all the discovered channels for a larger network map, which is saved as net.csv. This second feature takes a long time to run, but is worthwhile for a broader analysis. This edglist can then be used with software such as Gephi to visualize the network you have discovered.
This tool archives the entirety of the chats you specify in to_archive.csv (this must have only one column with “To” as the header). Messages are archives in both .CSV and .JSON formats and media content (photos, videos and documents) is saved to the directory Telepathy is installed in. For the tool to work, the chat has to either be public, or your Telegram account needs to be a member. The tool can also be set to run on a cron job to regularly archive target chats. Please use responsibly.
Tip: Comment out the three lines of code below to skip archiving of media content.
#if message.media: # path = await message.download_media() # print('File saved to', path)
Please send feedback to @jordanwildon on Twitter
You may use Telepathy however you like, but your usecase is your responsibility. Be safe and respectful.
All tools created by Jordan Wildon (@) with some suggestions, improvements and bug-busting contributed by Alex Newhouse (@AlexBNewhouse).
Where possible, credit for the use of this tool in published research is desired, but not required.