mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-11-22 03:19:53 -08:00
New encryption (#21)
* new encryption for animixplay direct links fix increment char for uppercase letters * apply fixes
This commit is contained in:
parent
06d3ad3ff2
commit
211850c85f
10
ani-cli
10
ani-cli
@ -94,7 +94,7 @@ generate_link() {
|
|||||||
[ -z "$id" ] && return 0
|
[ -z "$id" ] && return 0
|
||||||
enc_id=$(printf "%s" "$id" | base64)
|
enc_id=$(printf "%s" "$id" | base64)
|
||||||
ani_id=$(printf "%sLTXs3GrU8we9O%s" "$id" "$enc_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)
|
2)
|
||||||
provider_name='Xstreamcdn'
|
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")
|
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")
|
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")
|
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)
|
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')
|
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 |
|
result_links="$(printf '%s' "$data" | base64 --decode 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@:%_\+.~#?&\/\/=]*')"
|
tr -d \\\\ | sed -nE "s_.*file\":\"([^\"]*)\".*source.*_\1_p")"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
printf '%s' "$video_url"
|
printf '%s' "$video_url"
|
||||||
@ -217,7 +217,7 @@ search_anime() {
|
|||||||
fi
|
fi
|
||||||
lg "Search Query: $search"
|
lg "Search Query: $search"
|
||||||
curl -s "https://gogoanime.dk//search.html?keyword=$search" -L |
|
curl -s "https://gogoanime.dk//search.html?keyword=$search" -L |
|
||||||
sed -nE 's_^[[:space:]]*<a href="/category/([^"]*)" title.*">$_\1_p'
|
sed -nE "s_^[[:space:]]*<a href=\"/category/([^\"]*)\" title.*\">\$_\1_p"
|
||||||
}
|
}
|
||||||
|
|
||||||
# only lets the user pass in case of a valid search
|
# only lets the user pass in case of a valid search
|
||||||
|
Loading…
Reference in New Issue
Block a user