#!/bin/sh agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36" decrypt_link() { ajax_url='https://gogoplay.io/encrypt-ajax.php' video_id=$(printf "$1" | cut -d\? -f2 | cut -d\& -f1 | sed 's/id=//g') secret_key='3235373436353338353932393338333936373634363632383739383333323838' iv='34323036393133333738303038313335' ajax=$(printf "$video_id" | openssl enc -aes256 -K "$secret_key" -iv "$iv" -a) curl -s -H "X-Requested-With:XMLHttpRequest" -H "User-Agent:$agent" -H "Referer:https:$1" "$ajax_url" -d "id=$ajax" -d "time=69420691337800813569" | jq -r '.source[].file' | head -4 | tail -1 } url=$(curl -s -A "$agent" "https://gogoanime.film" | sed -nE 's/.*"name".*href="\/([^"]*)".*/\1/p' | dmenu -p "Select anime:") [ -z "$url" ] && notify-send -u critical "Err.. no anime selected" && exit 0 refr=$(curl -s -A "$agent" "https://gogoanime.film/$url" | sed -n -E 's/^[[:space:]]*