From 211850c85fb23bc92ad4d7f2b6d348a0d57db1d7 Mon Sep 17 00:00:00 2001 From: Kyle Yasuda <33813108+ksyasuda@users.noreply.github.com> Date: Mon, 14 Nov 2022 22:07:14 -0800 Subject: [PATCH] New encryption (#21) * new encryption for animixplay direct links fix increment char for uppercase letters * apply fixes --- ani-cli | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ani-cli b/ani-cli index e2cee8e..320b745 100755 --- a/ani-cli +++ b/ani-cli @@ -94,7 +94,7 @@ generate_link() { [ -z "$id" ] && return 0 enc_id=$(printf "%s" "$id" | base64) ani_id=$(printf "%sLTXs3GrU8we9O%s" "$id" "$enc_id" | base64) - result_links="$(curl -s "$BASE_URL/api/live${ani_id}" -A "$AGENT" -I | sed -nE 's_location: (.*)_\1_p' | cut -d"#" -f2 | base64 -d)" + result_links="$(curl -s "$BASE_URL/api/cW9${ani_id}" -A "$AGENT" -I | sed -nE 's_[L|l]ocation: https?://[^#]*#([^#]*).*_\1_p' | base64 --decode)" ;; 2) provider_name='Xstreamcdn' @@ -113,11 +113,11 @@ generate_link() { secret_key=$(printf "%s" "$resp" | sed -n '2p' | tr -d "\n" | od -A n -t x1 | tr -d " |\n") iv=$(printf "%s" "$resp" | sed -n '3p' | tr -d "\n" | od -A n -t x1 | tr -d " |\n") second_key=$(printf "%s" "$resp" | sed -n '4p' | tr -d "\n" | od -A n -t x1 | tr -d " |\n") - token=$(printf "%s" "$resp" | head -1 | base64 -d | openssl enc -d -aes256 -K "$secret_key" -iv "$iv" | sed -nE 's/.*&(token.*)/\1/p') + token=$(printf "%s" "$resp" | head -1 | base64 --decode | openssl enc -d -aes256 -K "$secret_key" -iv "$iv" | sed -nE 's/.*&(token.*)/\1/p') ajax=$(printf '%s' "$id" | openssl enc -e -aes256 -K "$secret_key" -iv "$iv" -a) data=$(curl -A "$AGENT" -sL -H "X-Requested-With:XMLHttpRequest" "${GOGOHD_URL}encrypt-ajax.php?id=${ajax}&alias=${id}&${token}" | sed -e 's/{"data":"//' -e 's/"}/\n/' -e 's/\\//g') - result_links="$(printf '%s' "$data" | base64 -d 2> /dev/null | openssl enc -d -aes256 -K "$second_key" -iv "$iv" 2> /dev/null | - sed -e 's/\].*/\]/' -e 's/\\//g' | grep -Eo 'https:\/\/[-a-zA-Z0-9@:%._\+~#=][a-zA-Z0-9][-a-zA-Z0-9@:%_\+.~#?&\/\/=]*')" + result_links="$(printf '%s' "$data" | base64 --decode 2> /dev/null | openssl enc -d -aes256 -K "$second_key" -iv "$iv" 2> /dev/null | + tr -d \\\\ | sed -nE "s_.*file\":\"([^\"]*)\".*source.*_\1_p")" ;; esac printf '%s' "$video_url" @@ -217,7 +217,7 @@ search_anime() { fi lg "Search Query: $search" curl -s "https://gogoanime.dk//search.html?keyword=$search" -L | - sed -nE 's_^[[:space:]]*$_\1_p' + sed -nE "s_^[[:space:]]*\$_\1_p" } # only lets the user pass in case of a valid search