d2ray/gen_upload.sh
quackerd 0fb39e9300
All checks were successful
continuous-integration/drone/push Build is passing
s
2021-04-10 06:07:21 -04:00

13 lines
307 B
Bash

#!/bin/sh
set +e
SALT=md5md5
mkdir -p ./uploads
for filename in ./confs/*; do
fname=$(basename $filename)
fhash=$(echo -n $fname.$SALT | openssl dgst -md5 | sed -E 's/\(stdin\)= (.*)/\1/')
openssl aes-256-cbc -md sha512 -pbkdf2 -in $filename -out ./uploads/$fhash.conf -k sergeygorbunov
done