Thanks to Rifting for the method. (post used)
- 🚧 Time zone should be in this format (tz identifier) : https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
- Find your token: https://gist.github.com/rifting/732a45adf8ebacfa0e1fda0a66662570#guide-computer
$ git clone https://github.com/kipruun/FLink-TOTP.git
$ python -m pip install pytz pyotp colorama
$ cd FLink-TOTP
$ python cli-flink.py
___ _ _ _ _____ ___ _____ ___
/ __\ (_)_ __ | | __ /__ \/___\/__ \/ _ \
/ _\ | | | '_ \| |/ / / /\// // / /\/ /_)/
/ / | | | | | | < / / / \_// / / / ___/
\/ |_|_|_| |_|_|\_\ \/ \___/ \/ \/
Creator: Kipruun
This module generates TOTP codes for a given secret key.
Please reffer to the documentation for more information.
[0] - Generate codes for all hours of the current day
[1] - Generate code for the current hour
[2] - Configuration
[3] - Exit
...
Configuration menu:
Configuration Menu
[0] - Show config
[1] - Change timezone
[2] - Change token
⚠️ Server has been only tested on PythonAnywhere
- Go to the script folder
- Change config (
config-server.json). Configure the token and the timezone - Make sure the file
totp.pyis present - Open CMD and type this :
python -m pip install flask fpdf pytz pyotp - Start
server.py
Installation (PythonAnywhere)
- Create an account
- Go to your web app
- Select the file which follows
WSGI configuration file - Replace with the code presents in
server.pyfile - Create an environement and set it up. Install dependecies.
- Make sure
totp.pyis in the same directory asserver.py - Reload app
Name of file : config.json / config-server.json
{
"token": "YOUR_SECRET",
"timezone": "Europe/Paris"
}
Sorry I'm not an english so that means there are many errors.