mirror of
https://github.com/moparisthebest/ImageDownloader
synced 2024-11-26 19:22:16 -05:00
Handle new 12-byte IV format in openbrowser.sh
This commit is contained in:
parent
760d14d160
commit
15dc9ae46b
@ -1,12 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
#exec firefox "$@"
|
||||||
set -e
|
set -e
|
||||||
URL=$1
|
URL=$1
|
||||||
BROWSER=xdg-open
|
BROWSER=xdg-open
|
||||||
|
BROWSER=firefox
|
||||||
AES_GCM="$(dirname $(readlink -f $0))/aesgcm"
|
AES_GCM="$(dirname $(readlink -f $0))/aesgcm"
|
||||||
if [ ${URL: -97:1} == "#" ]
|
if [ ${URL: -97:1} == "#" -o ${URL: -89:1} == "#" ]
|
||||||
then
|
then
|
||||||
[ -e "$AES_GCM" ] || gcc "$(dirname $(readlink -f $0))/aesgcm.c" -lcrypto -o "$AES_GCM"
|
[ -e "$AES_GCM" ] || gcc "$(dirname $(readlink -f $0))/aesgcm.c" -lcrypto -o "$AES_GCM"
|
||||||
curl "$URL" | "$AES_GCM" "${URL: -96}" | feh -. -
|
iv_key="$(echo "$URL" | sed 's/^.*#//')"
|
||||||
|
URL="$(echo "$URL" | sed 's/^aesgcm/https/')"
|
||||||
|
curl "$URL" | "$AES_GCM" "$iv_key" | feh -. -
|
||||||
elif echo $URL | grep -i '\.pgp$'
|
elif echo $URL | grep -i '\.pgp$'
|
||||||
then
|
then
|
||||||
curl "$URL" | gpg2 -d | feh -. -
|
curl "$URL" | gpg2 -d | feh -. -
|
||||||
|
Loading…
Reference in New Issue
Block a user