diff options
author | Simone Margaritelli <[email protected]> | 2023-04-21 19:07:32 +0200 |
---|---|---|
committer | Simone Margaritelli <[email protected]> | 2023-04-21 19:07:32 +0200 |
commit | de7fd5e5814d3e25ebbc594c2f06498c7b372d29 (patch) | |
tree | 16bdd98d9304d439f030db9b07f11f97e6d224e8 | |
parent | 00ddbc863e99c184c9f55d7787cc965f3e86e16a (diff) | |
download | OpenCortex-de7fd5e5814d3e25ebbc594c2f06498c7b372d29.tar.gz OpenCortex-de7fd5e5814d3e25ebbc594c2f06498c7b372d29.zip |
added Dockerfile (thanks @jwetzell)
-rw-r--r-- | qc_decrypt/Dockerfile | 11 | ||||
-rw-r--r-- | qc_decrypt/Makefile | 2 | ||||
-rw-r--r-- | qc_decrypt/README.md | 16 |
3 files changed, 26 insertions, 3 deletions
diff --git a/qc_decrypt/Dockerfile b/qc_decrypt/Dockerfile new file mode 100644 index 0000000..b8daecc --- /dev/null +++ b/qc_decrypt/Dockerfile @@ -0,0 +1,11 @@ +FROM gcc:12.2 AS builder +COPY ./ /usr/src/myapp +WORKDIR /usr/src/myapp +RUN make + +FROM debian:11-slim +COPY --from=builder /usr/src/myapp/qc_decrypt /usr/bin/qc_decrypt +RUN mkdir /data +WORKDIR /data +ENTRYPOINT [ "/usr/bin/qc_decrypt" ] + diff --git a/qc_decrypt/Makefile b/qc_decrypt/Makefile index a0e82db..d446c7a 100644 --- a/qc_decrypt/Makefile +++ b/qc_decrypt/Makefile @@ -1,5 +1,5 @@ all: - @gcc -I/opt/homebrew/opt/openssl/include -L/opt/homebrew/opt/openssl/lib -lcrypto qc_decrypt.c -o qc_decrypt + @gcc -lcrypto qc_decrypt.c -o qc_decrypt clean: @rm -rf qc_decrypt
\ No newline at end of file diff --git a/qc_decrypt/README.md b/qc_decrypt/README.md index b434975..e16b33e 100644 --- a/qc_decrypt/README.md +++ b/qc_decrypt/README.md @@ -1,9 +1,21 @@ NeuralDSP QuadCortex file decryptor. -Compile with `make` (requires gcc and openssl-dev installed), then pass the serial number found in `/etc/qc_sn` as command line argument: +Build the image: ```sh -./qc_decrypt QA00XXXXX /path/to/encrypted.json/cns/ldr/... > decrypted.dat +docker build . -t qc_decrypt +``` + +To decrypt user files (pass the serial number found in `/etc/qc_sn` as command line argument): + +```sh +docker run -v/path/to/your/files/:/data qc_decrypt QA00XXXXX /data/encrypted.json +``` + +To decrypt update files instead, provide an empty serial: + +```sh +docker run -v/path/to/your/files/:/data qc_decrypt "" /data/encrypted.json ``` ## License |