Parse a FreeOTP xml file and present QR codes or strings for import elsewhere
Project description
FreeOTP-Export
Rescue your OTP tokens from FreeOTP
Not compatible with modern FreeOTP
FreeOTP was finally updated and now uses a different storage format, which this tool does not yet support. See #1
Installing
You can install directly through pip: pip install freeotp-export
Alternatively, to install from source, clone the repo or download and unpack a tarball, then...
- If you already have poetry installed, you can
just run:
$ poetry run freeotp-export tokens.xml
- Otherwise, use pip:
pip install --upgrade . - If you must, running
__main__.pymay work if you have the dependencies installed.
Usage
Acquire the File
If your phone is rooted, you can just grab the file from
/data/data/org.fedorahosted.freeotp/shared_prefs/tokens.xml
Otherwise, start by enabling debugging on the phone and setting up the android
platform tools. Grab a backup off the app data by running
adb backup org.fedorahosted.freeotp, and when asked for a password, don't
enter one.
To read the resulting Android backup file, backup.ab, you can either use
android-backup-extractor:
$ abe unpack backup.ab - | tar xv --strip-components=3
Or yolo it by adding the tar header yourself:
$ ( printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" ; tail -c +25 backup.ab ) | tar zxv --strip-components=3
You should then have the token file, tokens.xml.
Read the File
Just run this tool, and it'll give you both the OTP URIs (otpauth://...) and
scannable QR codes. Note that Google Authenticator
ignores
the digits parameter, so it does not work for issuers like Blizzard that use
lengths other than 6.
If you used pip install: $ freeotp-export tokens.xml
Or with Poetry: $ poetry run freeotp-export tokens.xml
After importing everything to a new app, be sure to delete tokens.xml and
backup.ab, since they contain all of your tokens!
See Also
freeotp-export, an HTML/JS tool to do the same thing, which I discovered after writing and publishing this.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file freeotp_export-0.1.1.tar.gz.
File metadata
- Download URL: freeotp_export-0.1.1.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aaa839e6727162b3d2dd181bee23bb806a6589c74ba2c12d212915b7a460215a
|
|
| MD5 |
8de769f6f6191851fdd67423d2c95321
|
|
| BLAKE2b-256 |
2d5e725c1ac436c75c4135ddaefcd803f4349fd3944434eb583eaafd383cc746
|
File details
Details for the file freeotp_export-0.1.1-py3-none-any.whl.
File metadata
- Download URL: freeotp_export-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36a50538bd953136e1ecc8a4be10b2c72a0af42decf952aa2a6a6b6f675f4c40
|
|
| MD5 |
ef482fe64f70e1067190cc97864e4c58
|
|
| BLAKE2b-256 |
c170039f7afb0bb85ce3dca1b61ba54fd42ddfe2a5db3cdffe2d223292656599
|