Init
continuous-integration/drone/push Build is passing Details

master
Simon Bruder 2020-05-08 19:33:25 +02:00
commit 77da53f68b
No known key found for this signature in database
GPG Key ID: 6F03E0000CC5B62F
3 changed files with 42 additions and 0 deletions

13
.drone.yml Normal file
View File

@ -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

17
Dockerfile Normal file
View File

@ -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"]

12
entrypoint.sh Executable file
View File

@ -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