Fetch all information about Telegram group members and send Bulk SMS

Telegram, the another most popular instant messaging application after WhatsApp. Telegram is mainly popular because of its privacy features. Telegram has gain popularity because of its privacy policies. As company claims they entirely run on donations. That means, they don’t sell data of users like other companies, because of its privacy features. According to ethical hacking researcher of International Institute of Cyber Security telegram get many downloads in country like china where privacy is becoming main concern.

Developers can create applications for testing purposes. We will show you Telegram-Scarper which is used in collecting details about users which are connected with Telegram groups. Testers can also send bulk SMS to the collected users.

  • For testing, we will use Kali Linux 2018.4 amd64 with python3 installed.
  • For installing python open terminal, type sudo apt-get update and then type sudo apt-get install python3
  • Then type git clone https://github.com/th3unkn0n/TeleGram-Scraper.git
  • Type cd TeleGram-Scraper, then type python3 setup.py -i and then type python3 setup.py -c
  • Go to : https://my.telegram.org/auth Login with your mobile number. Enter OTP. Here we have to create application to get API, Hash ID, which we will used to fetch info of groups.
Telegram_Login
  • After login. Click on Create an Application.
Click on Create An Application
Click on Create An Application
  • Then enter app name, shorter app name, Click on others. Click on submit. After clicking on submit, app api id, app hash id and other details will be generated.
Telegram_Create_App
Telegram_Create_App
Application_Configuration
Application_Configuration
  • Now come back to your terminal. Type python3 setup.py -c
root@kali:/home/iicybersecurity/Downloads/TeleGram-Scraper# python3 setup.py -c
[+] selected module : -c

        ╔═╗┌─┐┌┬┐┬ ┬┌─┐
        ╚═╗├┤  │ │ │├─┘
        ╚═╝└─┘ ┴ └─┘┴

[+] enter api ID : 96####
[+] enter hash ID : 81cc9#########dbc528#######9a213
[+] enter phone number : +133#########95
[+] setup complete !
root@kali:/home/iicybersecurity/Downloads/TeleGram-Scraper#
  • Type python scraper.py This command will start fetching all groups name which are registered with Telegram.
root@kali:/home/iicybersecurity/Downloads/TeleGram-Scraper# python3 scraper.py


╔╦╗┌─┐┬  ┌─┐╔═╗  ╔═╗┌─┐┬─┐┌─┐┌─┐┌─┐┬─┐
 ║ ├┤ │  ├┤ ║ ╦  ╚═╗│  ├┬┘├─┤├─┘├┤ ├┬┘
 ╩ └─┘┴─┘└─┘╚═╝  ╚═╝└─┘┴└─┴ ┴┴  └─┘┴└─

            version : 3.1
        youtube.com/theunknon

[+] Choose a group to scrape members :
[0] - Cyber Security
[1] - Ethereum Anonymizer + BGXNode
[2] - Edward Snowden 2020
[3] - Earn-With-AdMob

[+] Enter a Number :
  • Above shows that 4 groups are currently associated with this mobile numbers. Enter desired number you want to fetch details of group.
  • Type 1
[+] Enter a Number : 1
[+] Fetching Members...
[+] Saving In file...
[+] Members scraped successfully.
root@kali:/home/iicybersecurity/Downloads/TeleGram-Scraper#

  • Fetched data saved in local directory.
  • Type ls and then type cat member.csv
+133######295.session  add2group.py  config.data  members.csv  README.md  scraper.py  setup.py  smsbot.py
root@kali:/home/iicybersecurity/Downloads/TeleGram-Scraper#
root@kali:/home/iicybersecurity/Downloads/TeleGram-Scraper#
root@kali:/home/iicybersecurity/Downloads/TeleGram-Scraper# cat members.csv
username,user id,access hash,name,group,group id
non_zero_sum,249835432,5639508652956130479,Андрей Н. Васютин,Ethereum Anonymizer + BGXNode,1341753370
fydocoko,518291617,2261639891674833544,Zachary Reed,Ethereum Anonymizer + BGXNode,1341753370
zxrcoin,541831480,4680744773991258028,zxrcoin,Ethereum Anonymizer + BGXNode,1341753370
zinson01,443779956,-8485130427783435014,ZINSON,Ethereum Anonymizer + BGXNode,1341753370
Zlerp,85240404,-8414728882269101921,Zlerp,Ethereum Anonymizer + BGXNode,1341753370
Kang_Ulum,399864378,-7221988205187136478,Muhammad Ziadatul Ulum,Ethereum Anonymizer + BGXNode,1341753370
alexandr_solarbiker,381910058,5960417245614948536,Александр Zikranets,Ethereum Anonymizer + BGXNode,1341753370
Oleksandr_ZZ,462435969,2233269819926680196,Oleksandr,Ethereum Anonymizer + BGXNode,1341753370
Nhor19,278455035,-6032487315907580860,Ainez| https://orionix.io/ https://www.zooomex.com// https://rok https://aigopay.tech/ ( https://auditchain.com/Supporter),Ethereum Anonymizer + BGXNode,1341753370
pakistanzindabad123,337686696,2305230747663529877,pakistan zindabad,Ethereum Anonymizer + BGXNode,1341753370
zulueta00111,408064138,-2382164076507110182,StarFish HASHRENTAL.IO,Ethereum Anonymizer + BGXNode,1341753370
ESAXTECHNOLOGY,343361930,495904487693954086,zarintasnim zarintasnim,Ethereum Anonymizer + BGXNode,1341753370
zef316,224375330,752963599192753450,zef316,Ethereum Anonymizer + BGXNode,1341753370
zorojee,338816871,3122127013437032488,zorojee,Ethereum Anonymizer + BGXNode,1341753370
izay0330,312188308,-8914045616999136510,zHai,Ethereum Anonymizer + BGXNode,1341753370
zenece1,402742569,5208166406099936871,Zenece1,Ethereum Anonymizer + BGXNode,1341753370
zainalabidin17,344141720,8398057362807732091,Zainal Abidin,Ethereum Anonymizer + BGX
  • Above you can check the details of users which are connected with Ethereum Anonymizer group.
  • We can also send bulk SMS to users of which we have collected details of users.
  • Type python3 smsbot.py members.csv This command will start sending SMS to users in members.csv It will start an SMS Bot.
  • Enter 2, it will send SMS using username.
root@kali:/home/iicybersecurity/Downloads/TeleGram-Scraper# python3 smsbot.py members.csv

    ╔╦╗┌─┐┬  ┌─┐╔═╗  ╔═╗┌─┐┬─┐┌─┐┌─┐┌─┐┬─┐
     ║ ├┤ │  ├┤ ║ ╦  ╚═╗│  ├┬┘├─┤├─┘├┤ ├┬┘
     ╩ └─┘┴─┘└─┘╚═╝  ╚═╝└─┘┴└─┴ ┴┴  └─┘┴└─

                version : 3.1
            youtube.com/theunknon

[1] send sms by user ID
[2] send sms by username
Input : 2
[+] Enter Your Message : hello
[+] Sending Message to: Андрей Н. Васютин
[+] Waiting 30 seconds
[+] Sending Message to: Zachary Reed
[+] Waiting 30 seconds
[+] Sending Message to: zxrcoin
[+] Waiting 30 seconds

  • Above has started sending message to users until the members list is finished.
  • Above you can see that message are sending automatically.