commit 77da53f68b6ac01f25a7c9d955bdbab628c693c3 Author: Simon Bruder Date: Fri May 8 19:33:25 2020 +0200 Init diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..187fdbe --- /dev/null +++ b/.drone.yml @@ -0,0 +1,13 @@ +kind: pipeline +name: default + +steps: +- name: docker + image: plugins/docker + settings: + registry: r.sbruder.de + username: + from_secret: docker_username + password: + from_secret: docker_password + repo: r.sbruder.de/audible-getkey diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..abc94a4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# Samples: https://github.com/inAudible-NG/audible-samples + +FROM alpine as download + +RUN apk add --no-cache git \ + && git clone --depth=1 https://github.com/inAudible-NG/tables + +RUN cd /opt/ \ + && wget -O- https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz | tar -Jxvf- + +FROM debian:testing + +COPY --from=download /tables /opt/rainbowcrack +COPY --from=download /opt/ffmpeg-*/ffprobe /usr/local/bin/ffprobe +COPY entrypoint.sh /usr/local/bin/ + +ENTRYPOINT ["entrypoint.sh"] diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..e7e4937 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/sh +set -e +if [ -z "$1" ]; then + echo "please provide a sample aax file" + exit 1 +fi + +CHECKSUM=$(ffprobe $1 2>&1 | grep -oP '\[aax\] file checksum == \K([0-9]|[a-f])*') + +echo "Getting key for checksum ${CHECKSUM}" +cd /opt/rainbowcrack/ +./rcrack . -h $CHECKSUM