Skip to main content

Parse a FreeOTP xml file and present QR codes or strings for import elsewhere

Project description

FreeOTP-Export

PyPi Version

Rescue your OTP tokens from FreeOTP

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__.py may 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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

freeotp-export-0.1.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

freeotp_export-0.1.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file freeotp-export-0.1.0.tar.gz.

File metadata

  • Download URL: freeotp-export-0.1.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.5 Linux/5.19.1-3-MANJARO

File hashes

Hashes for freeotp-export-0.1.0.tar.gz
Algorithm Hash digest
SHA256 195ba2d757e88633ad53f5825b703b6417bfaf9d85e57ef7a651ce993c521e13
MD5 9de50165658ebdeb87a884e257b5e589
BLAKE2b-256 f9cb814d7a61002e557108d3ef466316534a3a1a24acdd40bc41b27699c61c05

See more details on using hashes here.

File details

Details for the file freeotp_export-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: freeotp_export-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.5 Linux/5.19.1-3-MANJARO

File hashes

Hashes for freeotp_export-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 59953fe6565fde29da69fd8d2005841f6b6c6e73f5606f49a7602f70c8bfe0f6
MD5 0dbe630d3ca32d71167498e9d7db443f
BLAKE2b-256 d4f2a0913cd1093d133775b7c5b38786f6b71c404ef9653a7bdf5b0da6a0d5e5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page