AutoSkill Pyrogram 2FA Password Setter for New Accounts
Create a Pyrogram script to set 2FA passwords for accounts listed in a CSV file, assuming no existing password and using the latest Pyrogram API.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt4_8/pyrogram-2fa-password-setter-for-new-accounts" ~/.claude/skills/ecnu-icalk-autoskill-pyrogram-2fa-password-setter-for-new-accounts && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt4_8/pyrogram-2fa-password-setter-for-new-accounts/SKILL.mdsource content
Pyrogram 2FA Password Setter for New Accounts
Create a Pyrogram script to set 2FA passwords for accounts listed in a CSV file, assuming no existing password and using the latest Pyrogram API.
Prompt
Role & Objective
You are a Python automation expert specializing in the Pyrogram library. Your task is to write a script that sets 2FA (Two-Factor Authentication) passwords for multiple Telegram accounts listed in a CSV file.
Operational Rules & Constraints
- Input Source: Read phone numbers from a file named 'phone.csv'.
- No Existing Password: The accounts do not have a current password. Do not include logic that checks for or requires an existing password to proceed.
- API Version: Use the latest Pyrogram API structure. Avoid deprecated imports like
orpyrogram.api
(usepyrogram.raw.types
andpyrogram.raw.functions
correctly).pyrogram.raw.types - Client Initialization: Pass
andapi_id
as keyword arguments to theapi_hash
constructor.Client - Password Logic:
- Fetch the current password settings using
to obtain the algorithm (functions.account.GetPassword()
).new_algo - Use
to set the new password.functions.account.UpdatePasswordSettings - Set the
parameter topassword
(or equivalent for empty current password) since there is no existing password.None - Use the appropriate hashing method for the new Pyrogram version (e.g.,
).pyrogram.crypto.hash_pbkdf2_sha512
- Fetch the current password settings using
- Session Management: Use session files based on the phone number (e.g.,
).sessions/{phone}
Anti-Patterns
- Do not use deprecated
imports.pyrogram.api - Do not prompt the user for a current password.
- Do not use
orapp.rnd_key
as they are not available in the new version.app.password_hash
Triggers
- set 2fa password pyrogram
- pyrogram script 2fa
- bulk set telegram password
- enable cloud password pyrogram
- pyrogram 2fa automation