Skip to content
This repository was archived by the owner on Aug 5, 2023. It is now read-only.

Commit 94ace09

Browse files
committed
Dockerify
1 parent 63f4d4c commit 94ace09

File tree

2 files changed

+49
-21
lines changed

2 files changed

+49
-21
lines changed

Dockerfile

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM alpine:3.12
2+
LABEL maintainer="adiov"
3+
4+
RUN apk add --update-cache git \
5+
build-base \
6+
openssl-dev \
7+
tcl \
8+
python3 \
9+
py3-setuptools \
10+
python3-dev \
11+
&& git clone --depth 1 --branch v3.4.2 https://github.com/sqlcipher/sqlcipher.git \
12+
&& cd sqlcipher \
13+
&& ./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto" \
14+
&& make \
15+
&& make install \
16+
&& git clone --depth 1 https://github.com/rigglemania/pysqlcipher3.git \
17+
&& cd pysqlcipher3 \
18+
&& python3 setup.py build \
19+
&& python3 setup.py install
20+
21+
WORKDIR /authplus-to-andotp
22+
23+
ENTRYPOINT ["/usr/bin/python3", "/authplus-to-andotp/authplus-to-andotp.py"]

README.md

+26-21
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,48 @@
11
# Authenticator Plus to andOTP Magiculator
2+
23
The [Authenticator Plus app](https://play.google.com/store/apps/details?id=com.mufri.authenticatorplus) seems to have been abandoned by the developer. [andOTP](https://github.com/andOTP/andOTP) is a decent, open source, alternative.
34

45
This converts the Authenticator Plus backup database into andOTP-compatible backup database that can be directly important into andOTP.
56

67
# Installation
8+
9+
### With Docker
10+
11+
```
12+
$ docker build -t authplus-to-andotp-magiculator .
13+
```
14+
15+
### Without Docker
16+
717
The only dependency is [`pysqlcipher3`](https://github.com/rigglemania/pysqlcipher3). On my machine, I installed it like this:
818
```
9-
sudo apt install -y libsqlcipher-dev
10-
git clone https://github.com/rigglemania/pysqlcipher3
11-
cd pysqlcipher3
12-
python3 setup.py build
13-
sudo python3 setup.py install
19+
$ sudo apt install -y libsqlcipher-dev
20+
$ git clone https://github.com/rigglemania/pysqlcipher3
21+
$ cd pysqlcipher3
22+
$ python3 setup.py build
23+
$ sudo python3 setup.py install
1424
```
1525

1626
# Usage
17-
```
18-
./authplus-to-andotp.py -h
19-
usage: authplus-to-andotp.py [-h] [-d DB_NAME] [-o OUT_FILE] [-p PASSWORD]
2027

21-
Convert Authenticator Plus OTP backup database into andOTP backup database
28+
### With Docker:
2229

23-
optional arguments:
24-
-h, --help show this help message and exit
25-
-d DB_NAME, --database DB_NAME
26-
Authenticator Plus database, usually authplus.db
27-
-o OUT_FILE, --output-file OUT_FILE
28-
Output file name. Defaults to andOTP.json
29-
-p PASSWORD, --password PASSWORD
30-
Authenticator Plus master password (don't set if you
31-
wanna type password in a prompt instead)
3230
```
31+
$ docker run -v ${PWD}:/authplus-to-andotp -it authplus-to-andotp-magiculator --database authplus.db
32+
Authenticator Plus master password:
33+
andotp.json is now ready.
34+
```
35+
36+
### Without Docker:
3337

34-
Example:
3538
```
36-
./authplus-to-andotp.py --database authplus.db
39+
$ ./authplus-to-andotp.py --database authplus.db
3740
Authenticator Plus master password:
41+
andotp.json is now ready.
3842
```
3943

40-
## Caveats
44+
## Notes
45+
4146
- This will decrypt the Authenticator Plus backup database and output the andOTP backup database in decrypted plain-text. Be careful how you handle that.
4247
- This attempts to preserve the entries' icons/thumbnails by using the `Issuer` field as `thumbnail`, which doesn't have a 100% success rate, but should work most of the time.
4348
- As far as I can tell, Authenticator Plus doesn't handle checksum algorithms other than SHA-1 or OTP digits other than 6. The output file will use those values by default. The only exception seems to be Battle.net TOTP with which Authenticator Plus uses 8 digits; this script attempts to preserve this info and pass it to andOTP.

0 commit comments

Comments
 (0)