Skip to content

Commit

Permalink
fix: enimax c&d (rip)
Browse files Browse the repository at this point in the history
  • Loading branch information
justchokingaround committed Nov 8, 2023
1 parent 04244ff commit b35bd4f
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions lobster.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

LOBSTER_VERSION="4.1.1"
LOBSTER_VERSION="4.2.0"

config_file="$HOME/.config/lobster/lobster_config.txt"
lobster_editor=${VISUAL:-${EDITOR}}
Expand Down Expand Up @@ -328,9 +328,22 @@ EOF
else
json_key="sources"
encrypted=$(printf "%s" "$json_data" | tr "{}" "\n" | $sed -nE "s_.*\"${json_key}\":\"([^\"]*)\".*_\1_p")
enikey=$(curl -s "https://github.com/enimax-anime/key/blob/e${embed_type}/key.txt" | $sed -nE "s@.*rawLines\":\[\"([^\"]*)\".*@\1@p" |
$sed 's/\[\([0-9]*\),\([0-9]*\)\]/\1-\2/g;s/\[//g;s/\]//g;s/,/ /g')

claude_key=$(curl -s "https://github.com/Claudemirovsky/keys/blob/e${embed_type}/key" | $sed -nE "s@.*rawLines\":\[\"([^\"]*)\".*@\1@p" |
tr -d ' ' | $sed "s/],/ /g;s/\[//g;s/\]//g")
current_sum=0
eni_array=$(for pair in $claude_key; do
first_term=$(printf "%s" "$pair" | cut -d, -f1)
second_term=$(printf "%s" "$pair" | cut -d, -f2)
first_term=$((first_term + current_sum))
current_sum=$((current_sum + second_term))
second_term=$((first_term + second_term))
printf "[%s,%s]" "$first_term" "$second_term"
done)

enikey=$(printf "[%s]" "$eni_array" | $sed "s/\]\[/\],\[/g" | $sed 's/\[\([0-9]*\),\([0-9]*\)\]/\1-\2/g;s/\[//g;s/\]//g;s/,/ /g')
encrypted_video_link=$(printf "%s" "$json_data" | tr "{|}" "\n" | $sed -nE "s_.*\"sources\":\"([^\"]*)\".*_\1_p" | head -1)

final_key=""
Expand Down

0 comments on commit b35bd4f

Please sign in to comment.