d2ray/gen_upload.sh
quackerd 70855339c7
All checks were successful
continuous-integration/drone/push Build is passing
s
2021-04-10 05:53:47 -04:00

13 lines
309 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