# 2025.03.30 - [ranoz] Fix to handle new cookie requirements
# 2025.03.28 - [up_ranoz] Fix to handle new cookie requirements # 2025.03.28 - [up_anonfileio] Add anonfile.io as upload host # 2025.03.28 - [anonfileio] Add anonfile.io as download host # 2025.03.25 - [up_ranoz] Disable MAD randomized extension on uploads (7z block disabled) # 2025.03.21 - [mad] Update random user agents 2025.03 # 2025.03.20 - [jira hosts] Update 3 jira hosts (retention and maxsize) # 2025.03.16 - [torup] Fix torup cookies # 2025.03.15 - [1fichier] Get new node prior to cdn download (greater possibility of a faster node) # 2025.03.10 - [uploadscloud] Add uploadscloud.com as download host
This commit is contained in:
parent
a62ac882de
commit
270e378e08
18 changed files with 1338 additions and 630 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#! Name: ranoz.sh
|
||||
#! Author: kittykat
|
||||
#! Version: 2025.02.13
|
||||
#! Version: 2025.02.30
|
||||
#! Desc: Add support for downloading and processing of urls for a new host
|
||||
#! Usage: Copy this file into the ./${ScriptDir}/hosts/ folder
|
||||
#!
|
||||
|
|
@ -78,6 +78,8 @@ rz_DownloadFile() {
|
|||
rz_FetchFileInfo() {
|
||||
finalAttempt=$1
|
||||
maxfetchretries=5
|
||||
mkdir -p "${WorkDir}/.temp"
|
||||
rz_cookie_jar=$(mktemp "${WorkDir}/.temp/rz_cookies""${instance_no}"".XXXXXX")
|
||||
download_url="$remote_url"
|
||||
if grep -Eqi 'ranoz.gg/file/' <<< "$remote_url"; then
|
||||
echo -e "${GREEN}# Fetching download url…${NC}"
|
||||
|
|
@ -86,13 +88,16 @@ rz_FetchFileInfo() {
|
|||
printf " ."
|
||||
tor_identity="${RANDOM}"
|
||||
CLEANSTRING=${remote_url//[^a-zA-Z0-9]/}
|
||||
trap "rm -f ${WorkDir}/.flocks/${CLEANSTRING}; echo ""; tput cnorm; exit" 0 1 2 3 6 15
|
||||
response=$(tor_curl_request --insecure -L -s "$remote_url")
|
||||
trap "rm -f ${WorkDir}/.flocks/${CLEANSTRING}; rm -f ${rz_cookie_jar}; echo ""; tput cnorm; exit" 0 1 2 3 6 15
|
||||
response=$(tor_curl_request --insecure -L -i -s \
|
||||
-b "${rz_cookie_jar}" -c "${rz_cookie_jar}" \
|
||||
"$remote_url")
|
||||
if [[ "${DebugAllEnabled}" == "true" ]] ; then
|
||||
debugHtml "${remote_url##*/}" "rz_fetch$i" "${response}"
|
||||
fi
|
||||
if [[ -z $response ]] ; then
|
||||
if [[ $i == $maxfetchretries ]] ; then
|
||||
rm -f "${rz_cookie_jar}";
|
||||
printf "\\n"
|
||||
echo -e "${RED}| Failed to extract download url [1]${NC}"
|
||||
warnAndRetryUnknownError=true
|
||||
|
|
@ -105,6 +110,7 @@ rz_FetchFileInfo() {
|
|||
fi
|
||||
fi
|
||||
if grep -Eqi "There is no such file|UNAVAILABLE_FOR_LEGAL_REASONS|File was deleted because" <<< "$response"; then
|
||||
rm -f "${rz_cookie_jar}";
|
||||
printf "\\n"
|
||||
echo -e "${RED}| The file was not found. It could be deleted or expired.${NC}"
|
||||
exitDownloadError=true
|
||||
|
|
@ -112,6 +118,7 @@ rz_FetchFileInfo() {
|
|||
return 1
|
||||
fi
|
||||
if grep -Eqi 'NEXT_NOT_FOUND' <<< "$response"; then
|
||||
rm -f "${rz_cookie_jar}";
|
||||
printf "\\n"
|
||||
echo -e "${RED}| The file appears to be gone (NEXT_NOT_FOUND)${NC}"
|
||||
exitDownloadError=true
|
||||
|
|
@ -138,6 +145,7 @@ rz_FetchFileInfo() {
|
|||
break
|
||||
else
|
||||
if [[ $i == $maxfetchretries ]] ; then
|
||||
rm -f "${rz_cookie_jar}";
|
||||
printf "\\n"
|
||||
echo -e "${RED}| Failed to extract download url [2]${NC}"
|
||||
warnAndRetryUnknownError=true
|
||||
|
|
@ -157,7 +165,9 @@ rz_FetchFileInfo() {
|
|||
printf " ."
|
||||
CLEANSTRING=${remote_url//[^a-zA-Z0-9]/}
|
||||
trap "rm -f ${WorkDir}/.flocks/${CLEANSTRING}; rm -f ${rz_cookie_jar}; echo ""; tput cnorm; exit" 0 1 2 3 6 15
|
||||
file_header=$(tor_curl_request --insecure --head -L -i -s "$download_url")
|
||||
file_header=$(tor_curl_request --insecure --head -L -i -s \
|
||||
-b "${rz_cookie_jar}" -c "${rz_cookie_jar}" \
|
||||
"$download_url")
|
||||
if [[ "${DebugAllEnabled}" == "true" ]] ; then
|
||||
debugHtml "${remote_url##*/}" "rz_head$j" "download_url: ${download_url}"$'\n'"${file_header}"
|
||||
fi
|
||||
|
|
@ -217,6 +227,7 @@ rz_FetchFileInfo() {
|
|||
fi
|
||||
break #Good to go here
|
||||
done
|
||||
rm -f "${rz_cookie_jar}";
|
||||
touch "${WorkDir}/.flocks/${remote_url//[^a-zA-Z0-9]/}"
|
||||
if [[ ! "$filename_override" == "" ]] ; then
|
||||
filename="$filename_override"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue