banner
moeyy

moeyy

一条有远大理想的咸鱼。
github
mastodon
email

Telegram Time Name Update

Update the (name/surname/user) name of Telegram users every 30 seconds.

Preparation#

Operating environment: VPS, python3, python3-pip

Create an application: https://my.telegram.org/. Just fill in the application title and abbreviation. Obtain api_id and api_hash.

Install Environment#

(Tested only on Centos7.X)#

Install python3.6#

  • Install python36
[gilicode language=""]yum install python36 -y[/gilicode]
  • Check the version
    After installation, check if the python version is normal
[gilicode language=""]python36 --version[/gilicode]
  • Create symbolic links
[gilicode language=""]ln -s /usr/bin/python3.6 /usr/bin/py3[/gilicode]
[gilicode language=""]ln -s /usr/bin/python3.6 /usr/bin/python3[/gilicode]

Install pip3#

  • Install dependencies
[gilicode language=""]yum install openssl-devel -y[/gilicode]
[gilicode language=""]yum install zlib-devel -y[/gilicode]
  • Install setuptools
[gilicode language=""]wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-19.6.tar.gz#md5=c607dd118eae682c44ed146367a17e26[/gilicode]
[gilicode language=""]tar -zxvf setuptools-19.6.tar.gz[/gilicode]
[gilicode language=""]cd setuptools-19.6[/gilicode]
[gilicode language=""]python36 setup.py build[/gilicode]
[gilicode language=""]python36 setup.py install[/gilicode]
  • Install pip3
[gilicode language=""]wget https://github.com/pypa/pip/archive/9.0.1.tar.gz[/gilicode]
[gilicode language=""]tar -zvxf 9.0.1.tar.gz[/gilicode]
[gilicode language=""]cd pip-9.0.1[/gilicode]
[gilicode language=""]python36 setup.py install[/gilicode]
  • Check pip3 version
[gilicode language=""]pip --version[/gilicode]
  • Upgrade pip3
[gilicode language=""]pip3 install --upgrade pip[/gilicode]

Install screen (used to execute scripts even when SSH is disconnected)#

Installation command

[gilicode language=""]yum  install screen[/gilicode]
[gilicode language=""]screen -S  Moeyy   #Create a screen session, customize the name of the screen virtual terminal, Moeyy can be changed to the desired name[/gilicode]

Install and enable Telegram Name Update#

Download the demo program to the VPS#

[gilicode language=""]git clone https://github.com/xyou365/Telegram-Name-Updating.git[/gilicode]
[gilicode language=""]cd Telegram-Name-Updating[/gilicode]

Install telethon#

[gilicode language=""]pip3 install -r requirements.txt[/gilicode]

Run the Demo program (remember to use screen)#

[gilicode language=""]python3 tg_username_update.py [/gilicode]

API authentication and user login#

Enter api_id and api_hash as prompted. Then enter your phone number and verification code. If the account has enabled two-factor authentication, enter the two-factor authentication password as prompted. Finally, you will see it! The default success is. The surname is updated to a specific pattern every 30 seconds with a certain probability.

Effect Picture#

image

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.