mirror of
https://github.com/CoolnsX/repos_scripts.git
synced 2025-12-20 07:15:20 +05:30
Nothing to see here, move along
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
menu_droid () {
|
menu_droid () {
|
||||||
fzf --prompt="$1" "$2"
|
fzf --prompt="$1" $2
|
||||||
}
|
}
|
||||||
|
|
||||||
menu_linux () {
|
menu_linux () {
|
||||||
|
|||||||
18
ani-new
18
ani-new
@@ -17,16 +17,12 @@ down () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
decrypt_allanime() {
|
decrypt_allanime() {
|
||||||
for result in $(printf '%s' "$1" | xxd -r -p | od -An -v -t u1)
|
for hex in $(printf '%s' "$1" | sed 's/../&\n/g'); do
|
||||||
do
|
dec=$(printf '%d' "0x$hex")
|
||||||
for char in $(printf "%s" "1234567890123456789" | grep -o .)
|
xor=$((dec ^ 48))
|
||||||
do
|
oct=$(printf "%03o" "$xor")
|
||||||
decimal_char="$(printf "%02d" "'$char'")"
|
|
||||||
: $((result ^= decimal_char))
|
|
||||||
done
|
|
||||||
|
|
||||||
#shellcheck disable=SC2059
|
#shellcheck disable=SC2059
|
||||||
printf "\\$(printf "%03o" "$result")"
|
printf "\\$oct"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,7 +34,6 @@ provider_run(){
|
|||||||
[ -z "$provider_video" ] && return 0
|
[ -z "$provider_video" ] && return 0
|
||||||
[ -n "$3" ] && printf "%s : %s\n" "$1" "$provider_video" && return 0
|
[ -n "$3" ] && printf "%s : %s\n" "$1" "$provider_video" && return 0
|
||||||
case $provider_video in
|
case $provider_video in
|
||||||
*crunchyroll*) down "$base_url" "$(curl -s "$provider_video" -A "$agent" | sed -n '/x1080/{n;p;}')" "$1" ;;
|
|
||||||
*repackager.wixmp.com*) down "$base_url" "$(printf %s "$provider_video" | cut -d',' -f1,2 | tr -d ',' | sed 's|repackager.wixmp.com/||g')/mp4/file.mp4" "$1" ;;
|
*repackager.wixmp.com*) down "$base_url" "$(printf %s "$provider_video" | cut -d',' -f1,2 | tr -d ',' | sed 's|repackager.wixmp.com/||g')/mp4/file.mp4" "$1" ;;
|
||||||
*) down "$base_url" "$provider_video" "$1" ;;
|
*) down "$base_url" "$provider_video" "$1" ;;
|
||||||
esac
|
esac
|
||||||
@@ -66,7 +61,6 @@ esac
|
|||||||
trap "exit 0" INT HUP
|
trap "exit 0" INT HUP
|
||||||
info_$os "Parsing $base_url.. Please wait..."
|
info_$os "Parsing $base_url.. Please wait..."
|
||||||
|
|
||||||
|
|
||||||
query="query( \$search: SearchInput \$limit: Int \$page: Int \$translationType: VaildTranslationTypeEnumType \$countryOrigin: VaildCountryOriginEnumType ) { shows( search: \$search limit: \$limit page: \$page translationType: \$translationType countryOrigin: \$countryOrigin ) { edges { _id name lastEpisodeInfo __typename } }}"
|
query="query( \$search: SearchInput \$limit: Int \$page: Int \$translationType: VaildTranslationTypeEnumType \$countryOrigin: VaildCountryOriginEnumType ) { shows( search: \$search limit: \$limit page: \$page translationType: \$translationType countryOrigin: \$countryOrigin ) { edges { _id name lastEpisodeInfo __typename } }}"
|
||||||
[ -z "$1" ] && url=$(curl -e 'https://allanime.to' -s --cipher 'AES256-SHA256' -G "${base_url}/api" -d "variables=%7B%22search%22%3A%7B%22sortBy%22%3A%22Recent%22%2C%22allowAdult%22%3Atrue%2C%22allowUnknown%22%3Atrue%7D%2C%22limit%22%3A40%2C%22page%22%3A1%2C%22translationType%22%3A%22sub%22%2C%22countryOrigin%22%3A%22JP%22%7D" --data-urlencode "query=$query" -A "$agent" | sed 's|Show|\n|g' | sed -nE 's|.*_id":"([^"]*)","name":"([^"]*)".*sub":\{"episodeString":"([^"]*)".*|\1\t\2 Episode \3|p' | menu_$os "Select Anime: " '--with-nth 2..' | tr ':' ' ' | tr -s ' ') || url=$(printf "%s" "$1" | sed -nE 's|.*/watch/(.*)-sub|\1|p')
|
[ -z "$1" ] && url=$(curl -e 'https://allanime.to' -s --cipher 'AES256-SHA256' -G "${base_url}/api" -d "variables=%7B%22search%22%3A%7B%22sortBy%22%3A%22Recent%22%2C%22allowAdult%22%3Atrue%2C%22allowUnknown%22%3Atrue%7D%2C%22limit%22%3A40%2C%22page%22%3A1%2C%22translationType%22%3A%22sub%22%2C%22countryOrigin%22%3A%22JP%22%7D" --data-urlencode "query=$query" -A "$agent" | sed 's|Show|\n|g' | sed -nE 's|.*_id":"([^"]*)","name":"([^"]*)".*sub":\{"episodeString":"([^"]*)".*|\1\t\2 Episode \3|p' | menu_$os "Select Anime: " '--with-nth 2..' | tr ':' ' ' | tr -s ' ') || url=$(printf "%s" "$1" | sed -nE 's|.*/watch/(.*)-sub|\1|p')
|
||||||
|
|
||||||
@@ -77,7 +71,7 @@ ep_no=$(printf "%s" "$url" | sed 's/.*Episode //g')
|
|||||||
|
|
||||||
info_$os "Loading Episode $title.."
|
info_$os "Loading Episode $title.."
|
||||||
episode_embed_gql="query (\$showId: String!, \$translationType: VaildTranslationTypeEnumType!, \$episodeString: String!) { episode( showId: \$showId translationType: \$translationType episodeString: \$episodeString ) { episodeString sourceUrls }}"
|
episode_embed_gql="query (\$showId: String!, \$translationType: VaildTranslationTypeEnumType!, \$episodeString: String!) { episode( showId: \$showId translationType: \$translationType episodeString: \$episodeString ) { episodeString sourceUrls }}"
|
||||||
data=$( curl -e https://allanime.to -sL --cipher AES256-SHA256 -G "{$base_url}/api" --data-urlencode "variables={\"showId\":\"$id\",\"translationType\":\"sub\",\"countryOrigin\":\"ALL\",\"episodeString\":\"$ep_no\"}" --data-urlencode "query=$episode_embed_gql" -A 'Mozilla/5.0 (Windows NT 6.1; Win64; rv:109.0) Gecko/20100101 Firefox/109.0' | tr '{}' '\n' | sed 's|\\u002F|\/|g;s|\\||g' | sed -nE 's|.*sourceUrl":"#?([^"]*)".*sourceName":"([^"]*)".*|\2 :\1|p')
|
data=$(curl -e https://allanime.to -sL --cipher AES256-SHA256 -G "{$base_url}/api" --data-urlencode "variables={\"showId\":\"$id\",\"translationType\":\"sub\",\"countryOrigin\":\"ALL\",\"episodeString\":\"$ep_no\"}" --data-urlencode "query=$episode_embed_gql" -A 'Mozilla/5.0 (Windows NT 6.1; Win64; rv:109.0) Gecko/20100101 Firefox/109.0' | tr '{}' '\n' | sed 's|\\u002F|\/|g;s|\\||g' | sed -nE 's|.*sourceUrl":"##([^"]*)".*sourceName":"([^"]*)".*|\2 :\1|p')
|
||||||
info_$os "Fetching Embed links"
|
info_$os "Fetching Embed links"
|
||||||
|
|
||||||
#dropbox links
|
#dropbox links
|
||||||
|
|||||||
30
fap-cli
30
fap-cli
@@ -49,9 +49,11 @@ input() {
|
|||||||
stream() {
|
stream() {
|
||||||
case $player_fn in
|
case $player_fn in
|
||||||
vlc)
|
vlc)
|
||||||
uname -a | grep -qE "[Aa]ndroid" && am start --user 0 -a android.intent.action.VIEW -d "$1" -n org.videolan.vlc/org.videolan.vlc.gui.video.VideoPlayerActivity -e "title" "$2" > /dev/null 2>&1 || setsid -f "$player_fn" --http-referrer="$base_url" "$1" > /dev/null 2>&1;;
|
uname -a | grep -qE "[Aa]ndroid" && am start --user 0 -a android.intent.action.VIEW -d "$1" -n org.videolan.vlc/org.videolan.vlc.gui.video.VideoPlayerActivity -e "title" "$2" >/dev/null 2>&1 || setsid -f "$player_fn" --http-referrer="$base_url" "$1" >/dev/null 2>&1
|
||||||
|
;;
|
||||||
mpv)
|
mpv)
|
||||||
uname -a | grep -qE "[Aa]ndroid" && am start --user 0 -a android.intent.action.VIEW -d "$1" -n is.xyz.mpv/.MPVActivity > /dev/null 2>&1 || setsid -f "$player_fn" "$1" --referrer="$base_url" --force-media-title="$2" > /dev/null 2>&1;;
|
uname -a | grep -qE "[Aa]ndroid" && am start --user 0 -a android.intent.action.VIEW -d "$1" -n is.xyz.mpv/.MPVActivity >/dev/null 2>&1 || setsid -f "$player_fn" "$1" --referrer="$base_url" --force-media-title="$2" >/dev/null 2>&1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,9 +61,11 @@ download () {
|
|||||||
printf "${c_blue}Downloading %s${c_reset}\n" "$2"
|
printf "${c_blue}Downloading %s${c_reset}\n" "$2"
|
||||||
case $1 in
|
case $1 in
|
||||||
*m3u8)
|
*m3u8)
|
||||||
ffmpeg -loglevel error -stats -referer "$base_url" -i "$1" -c copy "$download_dir/$u2.mp4";;
|
hls -n 300 -ro "$download_dir/$2" "$1"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
aria2c --summary-interval=0 -x 16 -s 16 --referer="$base_url" "$1" --dir=$download_dir -o "$2.mp4" --download-result=hide;;
|
aria2c --summary-interval=0 -x 16 -s 16 --referer="$base_url" "$1" --dir=$download_dir -o "$2.mp4" --download-result=hide
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,19 +151,25 @@ while :; do
|
|||||||
read choice
|
read choice
|
||||||
case $choice in
|
case $choice in
|
||||||
d)
|
d)
|
||||||
download "$video_link" "$display";;
|
download "$video_link" "$display"
|
||||||
|
;;
|
||||||
n)
|
n)
|
||||||
ep_no=$((ep_no + 1))
|
ep_no=$((ep_no + 1))
|
||||||
[ "$ep_no" -gt "$noofeps" ] && err "Episode out of range" && ep_no=$((ep_no-1)) || get_ep_link;;
|
[ "$ep_no" -gt "$noofeps" ] && err "Episode out of range" && ep_no=$((ep_no - 1)) || get_ep_link
|
||||||
|
;;
|
||||||
p)
|
p)
|
||||||
ep_no=$((ep_no - 1))
|
ep_no=$((ep_no - 1))
|
||||||
[ "$ep_no" -lt "1" ] && err "Episode out of range" && ep_no=$((ep_no+1)) || get_ep_link;;
|
[ "$ep_no" -lt "1" ] && err "Episode out of range" && ep_no=$((ep_no + 1)) || get_ep_link
|
||||||
|
;;
|
||||||
e)
|
e)
|
||||||
input "$noofeps"
|
input "$noofeps"
|
||||||
get_ep_link;;
|
get_ep_link
|
||||||
|
;;
|
||||||
q)
|
q)
|
||||||
break;;
|
break
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
err "invalid choice";;
|
err "invalid choice"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|||||||
1
rss
1
rss
@@ -1,6 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
|
||||||
if [ "$(uname -o)" = "Android" ]; then
|
if [ "$(uname -o)" = "Android" ]; then
|
||||||
os="droid"
|
os="droid"
|
||||||
script_dir="$HOME"
|
script_dir="$HOME"
|
||||||
|
|||||||
3
tor-bay
3
tor-bay
@@ -7,7 +7,8 @@ cal_size() {
|
|||||||
|
|
||||||
display() {
|
display() {
|
||||||
for i in $(seq $(printf "%s\nlol" "$2" | wc -l)); do
|
for i in $(seq $(printf "%s\nlol" "$2" | wc -l)); do
|
||||||
printf "[%s GB;S:%s\n" "$(cal_size "$(printf "%s" "$1" | sed -n "${i}p")")" "$(printf "%s" "$2" | sed -n "${i}p")" & done
|
printf "[%s GB;S:%s\n" "$(cal_size "$(printf "%s" "$1" | sed -n "${i}p")")" "$(printf "%s" "$2" | sed -n "${i}p")" &
|
||||||
|
done
|
||||||
wait
|
wait
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
9
torrent
9
torrent
@@ -29,7 +29,8 @@ printf "${c_reset}\n\tenter choice:"
|
|||||||
read -r ch
|
read -r ch
|
||||||
case $ch in
|
case $ch in
|
||||||
f)
|
f)
|
||||||
down "$magnet";;
|
down "$magnet"
|
||||||
|
;;
|
||||||
p)
|
p)
|
||||||
aria2c --dir=$HOME/.cache --bt-metadata-only=true --bt-save-metadata=true "$magnet"
|
aria2c --dir=$HOME/.cache --bt-metadata-only=true --bt-save-metadata=true "$magnet"
|
||||||
tput reset
|
tput reset
|
||||||
@@ -37,7 +38,9 @@ case $ch in
|
|||||||
printf "Enter file idx(default=all):"
|
printf "Enter file idx(default=all):"
|
||||||
read -r ind
|
read -r ind
|
||||||
down "$HOME/.cache/*.torrent" "$ind"
|
down "$HOME/.cache/*.torrent" "$ind"
|
||||||
rm -f $HOME/.cache/*.torrent;;
|
rm -f $HOME/.cache/*.torrent
|
||||||
|
;;
|
||||||
q)
|
q)
|
||||||
exit 0;;
|
exit 0
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
2
youtube
2
youtube
@@ -1,5 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# script for downloading videos/audios from sites...
|
# script for downloading videos/audios from sites...
|
||||||
# defining shell colors for distinction
|
# defining shell colors for distinction
|
||||||
|
|||||||
Reference in New Issue
Block a user