Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/AginSquash/2FA-Telegram
This telegram bot written in Python will help you access the 2FA codes. All your keys for generating 2FA are stored in an encrypted file. Used Fernet symmetric encryption.
https://github.com/AginSquash/2FA-Telegram
2fa 2fa-codes 2fa-keys fernet pyotp python telegram-bot twofactorauth
Last synced: 20 days ago
JSON representation
This telegram bot written in Python will help you access the 2FA codes. All your keys for generating 2FA are stored in an encrypted file. Used Fernet symmetric encryption.
- Host: GitHub
- URL: https://github.com/AginSquash/2FA-Telegram
- Owner: AginSquash
- License: mit
- Created: 2019-04-27T22:34:38.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-18T23:08:15.000Z (over 4 years ago)
- Last Synced: 2024-08-13T03:05:59.093Z (4 months ago)
- Topics: 2fa, 2fa-codes, 2fa-keys, fernet, pyotp, python, telegram-bot, twofactorauth
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 13
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 2FA-Telegram
## What is it?
This simple telegram bot written in Python will help you access the 2FA codes.
All your keys for generating 2FA are stored in an encrypted file (used Fernet symmetric encryption.
## Setup
#### 1. Dependencies
Firstly you need to install dependencies ([telepot](https://github.com/nickoala/telepot), [pyotp](https://github.com/pyauth/pyotp), [cryptography](https://github.com/pyca/cryptography)) using:pip3 install -r requirements.txt
#### 2. Registration
Send a message [BotFather](https://telegram.me/botfather) and register a bot. I recommend using the bot's name as random as possible
>for example: mhdpjuh7wgdhumy9z2_bot#### 3. Config file
Now you need to create a file **`config.py`** like this:token = "1234567:XXXXXXXXXXXXX"
Run the bot and write him any message. A message will appear in the console like this: `"Chat id: 98765432"`.
Now place this id to the config file. As a result, the file should look like this:token = "1234567:XXXXXXXXXXXXX"
admin_id = 98765432## Usage
#### 1. Setting 2FA key-store password
**/pass** - This command sets a password to the repository.Using like
> /pass 1a2b3c4d5e6I recommend resetting the password variable after using the bot:
> /pass nullYou need to re-enter the password for the next use after this command.
It's help you to secure store your 2FA-keys.**Attention! Before use `/add` and `/get` you need set password for key-store**
#### 2. Adding service
**/add** - This command add service to the repository.
> /add [service_name] [key]For example:
> /add PyOTP_Test JBSWY3DPEHPK3PXP#### 3. Get 2FA codes
**/get** - This command return 2FA-code to the repository.
> /get [service_name]`/get` without args return full list of service_name + 2FA-code
Example:
> /get PyOTP_Test#### 4. Delete or change password
For security reasons, you can not remove the service through the bot (this is a feature). To delete (or receive data without telegram bot, or change local key-store password) use `CodesEditor.py` local.>python3 `CodesEditor.py`
## Thanks
I want to thank the developers of these beautiful libraries:
[telepot](https://github.com/nickoala/telepot), [pyotp](https://github.com/pyauth/pyotp), [cryptography](https://github.com/pyca/cryptography).