mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-10-28 04:44:11 -07:00
update decryption alg
This commit is contained in:
parent
d7e78836a4
commit
13635cabf2
9
ani-cli
9
ani-cli
@ -106,13 +106,12 @@ decrypt_link() {
|
|||||||
lg "BEGIN: decrypt_link()" > /dev/stderr
|
lg "BEGIN: decrypt_link()" > /dev/stderr
|
||||||
ajax_url="$BASE_URL/encrypt-ajax.php"
|
ajax_url="$BASE_URL/encrypt-ajax.php"
|
||||||
id=$(printf "%s" "$1" | sed -nE 's/.*id=(.*)&title.*/\1/p')
|
id=$(printf "%s" "$1" | sed -nE 's/.*id=(.*)&title.*/\1/p')
|
||||||
resp=$(curl -s "$1")
|
iv=$(curl -s "$1" | sed -nE 's/.*class="wrapper container-(.*)">/\1/p' | tr -d "\n" | od -A n -t x1 | tr -d " |\n")
|
||||||
secret_key=$(printf "%s" "$resp" | sed -nE 's/.*class="container-(.*)">/\1/p' | tr -d "\n" | od -A n -t x1 | tr -d " |\n")
|
dec_id=$(printf "%s" "$id" | base64 -d | od -A n -t x1 | tr -d " |\n")
|
||||||
iv=$(printf "%s" "$resp" | sed -nE 's/.*class="wrapper container-(.*)">/\1/p' | tr -d "\n" | od -A n -t x1 | tr -d " |\n")
|
secret_key=$(printf "%s%s" "$dec_id" "$iv" | cut -c-32 | tr -d "\n" | od -A n -t x1 | tr -d " |\n")
|
||||||
second_key=$(printf "%s" "$resp" | sed -nE 's/.*class=".*videocontent-(.*)">/\1/p' | tr -d "\n" | od -A n -t x1 | tr -d " |\n")
|
|
||||||
ajax=$(printf '%s' "$id" | openssl enc -e -aes256 -K "$secret_key" -iv "$iv" | base64)
|
ajax=$(printf '%s' "$id" | openssl enc -e -aes256 -K "$secret_key" -iv "$iv" | base64)
|
||||||
data=$(curl -s -H "X-Requested-With:XMLHttpRequest" "$ajax_url" -d "id=$ajax" -d "alias=$id" | sed -e 's/{"data":"//' -e 's/"}/\n/' -e 's/\\//g')
|
data=$(curl -s -H "X-Requested-With:XMLHttpRequest" "$ajax_url" -d "id=$ajax" -d "alias=$id" | sed -e 's/{"data":"//' -e 's/"}/\n/' -e 's/\\//g')
|
||||||
printf '%s' "$data" | base64 -d | openssl enc -d -aes256 -K "$second_key" -iv "$iv" | sed -e 's/\].*/\]/' -e 's/\\//g' |
|
printf '%s' "$data" | base64 -d | openssl enc -d -aes256 -K "$secret_key" -iv "$iv" | sed -e 's/\].*/\]/' -e 's/\\//g' |
|
||||||
grep -Eo 'https:\/\/[-a-zA-Z0-9@:%._\+~#=][a-zA-Z0-9][-a-zA-Z0-9@:%_\+.~#?&\/\/=]*'
|
grep -Eo 'https:\/\/[-a-zA-Z0-9@:%._\+~#=][a-zA-Z0-9][-a-zA-Z0-9@:%_\+.~#?&\/\/=]*'
|
||||||
lg "END: decrypt_link()" > /dev/stderr
|
lg "END: decrypt_link()" > /dev/stderr
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user