From abf0572389e1199689b701ba6f17b282f4476fab Mon Sep 17 00:00:00 2001 From: Max Muth Date: Tue, 29 Jul 2025 20:45:48 +0200 Subject: [PATCH 1/3] doc: add instructions to run script with uv --- decrypt.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/decrypt.py b/decrypt.py index 3f23b91..927142e 100644 --- a/decrypt.py +++ b/decrypt.py @@ -1,3 +1,11 @@ +#!/usr/bin/env -S uv run --script + +# /// script +# dependencies = [ +# "cryptography", +# ] +# /// + import json import base64 import binascii # For base16 decoding From 07b551759723875e9c31fb6f0d29d273dcb5d1e3 Mon Sep 17 00:00:00 2001 From: Max Muth Date: Tue, 29 Jul 2025 20:52:05 +0200 Subject: [PATCH 2/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a1128df..1dc67ac 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ At this point, mitmproxy should have logged your authenticator tokens in encrypt Obviously, yours will show real information about every token you have in your Authy account. Once you find this request, switch to the "Flow" tab in mitmweb, then hit "Download" to download this data into a file called "authenticator_tokens". Rename this file to "authenticator_tokens.json" and disconnect your device from the proxy (select "Off" in Settings -> Wi-Fi -> (your network) -> Configure Proxy) before exiting out of the proxy on your computer (hit Ctrl+C on the terminal window running mitmweb) and continuing to the next step. ## Step 3: Decrypting tokens -You now have an authenticator_tokens.json file with your tokens in it, but it's encrypted and can't be used. Luckily, this file can be decrypted with your backup password and a Python script. Download the "decrypt.py" file in this repo, make sure your authenticator_tokens.json file is in the same folder as decrypt.py, and then run the Python script with `python3 decrypt.py`. +You now have an authenticator_tokens.json file with your tokens in it, but it's encrypted and can't be used. Luckily, this file can be decrypted with your backup password and a Python script. Download the "decrypt.py" file in this repo, make sure your authenticator_tokens.json file is in the same folder as decrypt.py, and then run the Python script with `uv run decrypt`, or install the dependencies manually and run `python3 decrypt.py`. > [!NOTE] > If you get an error that python3 couldn't be found, install Python on your computer from [python.org](https://www.python.org). If you get an error that the "cryptography" package couldn't be found, install it with `pip3 install cryptography`. From 4c261525f20dddc8e2bc73911e60b9504d03f382 Mon Sep 17 00:00:00 2001 From: Max Muth Date: Tue, 29 Jul 2025 20:52:29 +0200 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1dc67ac..1c9fd6d 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ At this point, mitmproxy should have logged your authenticator tokens in encrypt Obviously, yours will show real information about every token you have in your Authy account. Once you find this request, switch to the "Flow" tab in mitmweb, then hit "Download" to download this data into a file called "authenticator_tokens". Rename this file to "authenticator_tokens.json" and disconnect your device from the proxy (select "Off" in Settings -> Wi-Fi -> (your network) -> Configure Proxy) before exiting out of the proxy on your computer (hit Ctrl+C on the terminal window running mitmweb) and continuing to the next step. ## Step 3: Decrypting tokens -You now have an authenticator_tokens.json file with your tokens in it, but it's encrypted and can't be used. Luckily, this file can be decrypted with your backup password and a Python script. Download the "decrypt.py" file in this repo, make sure your authenticator_tokens.json file is in the same folder as decrypt.py, and then run the Python script with `uv run decrypt`, or install the dependencies manually and run `python3 decrypt.py`. +You now have an authenticator_tokens.json file with your tokens in it, but it's encrypted and can't be used. Luckily, this file can be decrypted with your backup password and a Python script. Download the "decrypt.py" file in this repo, make sure your authenticator_tokens.json file is in the same folder as decrypt.py, and then run the Python script with `uv run decrypt.py`, or install the dependencies manually and run `python3 decrypt.py`. > [!NOTE] > If you get an error that python3 couldn't be found, install Python on your computer from [python.org](https://www.python.org). If you get an error that the "cryptography" package couldn't be found, install it with `pip3 install cryptography`.