From fc6984691e4f9d4ee1fdf58fc0e3c0e2e8dd400e Mon Sep 17 00:00:00 2001 From: Andriy Tymchenko Date: Sun, 7 Jun 2026 22:20:08 +0300 Subject: [PATCH 1/2] add script in Python 3.x --- contrib/rsc2authpro.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 contrib/rsc2authpro.py diff --git a/contrib/rsc2authpro.py b/contrib/rsc2authpro.py new file mode 100755 index 0000000..0795b2c --- /dev/null +++ b/contrib/rsc2authpro.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 +import sys + +def convert_rsc_config_to_otpauth(config_path): + with open(config_path, 'r') as f: + for line in f: + parts = line.strip().split() + if len(parts) == 3 and parts[1] == '6': + label, digits, secret = parts + otpauth = f"otpauth://totp/{label}:{label}?secret={secret}&issuer={label}&digits=6" + print(otpauth) + +if len(sys.argv) < 2: + print("Usage: python rsc2authpro.py ~/.2fa") + sys.exit(1) +convert_rsc_config_to_otpauth(sys.argv[1]) From 1001ed542cc1fed9f8fed7c516531fd20d0306a8 Mon Sep 17 00:00:00 2001 From: Andriy Tymchenko Date: Sun, 7 Jun 2026 22:20:44 +0300 Subject: [PATCH 2/2] minimal README --- contrib/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 contrib/README.md diff --git a/contrib/README.md b/contrib/README.md new file mode 100644 index 0000000..e2338e4 --- /dev/null +++ b/contrib/README.md @@ -0,0 +1,10 @@ +tiny tool to export the set of secrets in .2fa into text file for [Authenticator Pro](https://stratumauth.com/) + +usage: +```bash +./path-to/rsc2authpro.py .2fa > uris.txt +``` + +normally it prints into stdout set of secrets in form similar to + +otpauth://totp/Example:alice@example.com?secret=JBSWY3DPEHPK3PXP&issuer=Example