# 2025.02.14 - [mad] Add helpful verbiage for user on MAD Randomized Extension upload urls

# 2025.02.14 - [up_ranoz] Add help "[rand ext, rename to <filename> or use MAD v2025.02.13+]" to url
# 2025.02.14 - [up_uploadhive] Add help "[rand ext, rename to <filename> or use MAD v2025.02.13+]" to url
# 2025.02.13 - [mad] Add "RanozRandomizeExt" MAD randomized extension configurable variable
# 2025.02.13 - [up_ranoz] Add MAD randomized extension upload handling
# 2025.02.13 - [ranoz] Add MAD randomized extension download handling
# 2025.02.13 - [sendnow] Extend request timeout for head / get (server response time lag)
This commit is contained in:
kittykat 2025-02-17 22:54:05 +00:00
parent 0face871aa
commit d48116dbe3
Signed by: kittykat
GPG key ID: E3F1556620F70C3C
14 changed files with 880 additions and 552 deletions

View file

@ -1,6 +1,6 @@
#! Name: sendnow.sh
#! Author: kittykat
#! Version: 2025.02.12
#! Version: 2025.02.15
#! Desc: Add support for downloading and processing of urls for a new host
#! Usage: Copy this file into the ./${ScriptDir}/hosts/ folder
#!
@ -79,7 +79,7 @@ snow_FetchFileInfo() {
finalAttempt=$1
maxfetchretries=5
snow_cookie_jar=""
echo -e "${GREEN}# Fetching download link${NC}"
echo -e "${GREEN}# Fetching post info${NC}"
for ((i=1; i<=$maxfetchretries; i++)); do
mkdir -p "${WorkDir}/.temp"
snow_cookie_jar=$(mktemp "${WorkDir}/.temp/snow_cookies""${instance_no}"".XXXXXX")
@ -105,7 +105,7 @@ snow_FetchFileInfo() {
continue
fi
fi
if grep -Eqi "Sorry, you are banned" <<< "$response"; then
if grep -Eqi "Your IP has been banned|you are banned" <<< "$response"; then
rm -f "${snow_cookie_jar}";
if [ $i == $maxfetchretries ] ; then
printf "\\n"
@ -135,6 +135,7 @@ snow_FetchFileInfo() {
post_rand=$(grep -oPi '(?<=input type="hidden" name="rand" value=").*(?=">)' <<< "$response")
post_referer=$(grep -oPi '(?<=input type="hidden" name="referer" value=").*(?=">)' <<< "$response")
fi
file_size_readable=$(grep -oPi '(?<=</i> Download \[).*?(?=\]</button>.*$)' <<< "$response")
if [[ -z "$post_op" ]] || [[ -z "$post_id" ]] ; then
rm -f "${snow_cookie_jar}";
if [ $i == $maxfetchretries ] ; then
@ -152,6 +153,7 @@ snow_FetchFileInfo() {
break
fi
done
echo -e "${GREEN}# Fetching download url…${NC}"
CLEANSTRING=${remote_url//[^a-zA-Z0-9]/}
trap "rm -f ${WorkDir}/.flocks/${CLEANSTRING}; echo ""; rm -f $snow_cookie_jar; tput cnorm; exit" 0 1 2 3 6 15
form_data="op=$post_op&id=$post_id&rand=$post_rand&referer=&method_free=&method_premium="
@ -182,6 +184,7 @@ snow_FetchFileInfo() {
download_url=${download_url//[$'\t\r\n']}
filename="${download_url##*/}"
filename=${filename//[$'\t\r\n']}
download_url=$(urlencode_literal_grouped_case_urlendingonly ${download_url})
else
echo -e "${RED}| Failed to extract download link [3]${NC}"
warnAndRetryUnknownError=true
@ -193,11 +196,12 @@ snow_FetchFileInfo() {
fi
echo -e "${GREEN}# Fetching file info…${NC}"
fshost=$(grep -oPi -m 1 '(?<=https://).*?(?=/d/)' <<< "$download_url")
fshost=${fshost//[$'\t\r\n']}
for ((j=1; j<=$maxfetchretries; j++)); do
printf " ."
CLEANSTRING=${remote_url//[^a-zA-Z0-9]/}
trap "rm -f ${WorkDir}/.flocks/${CLEANSTRING}; rm -f ${snow_cookie_jar}; echo ""; tput cnorm; exit" 0 1 2 3 6 15
file_header=$(tor_curl_request --insecure --head -Lis \
file_header=$(tor_curl_request_extended --insecure --head -Lis \
-H "Host: $fshost" \
-H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" \
-H "Accept-Language: en-US,en;q=0.5" \
@ -284,7 +288,7 @@ snow_FetchFileInfo() {
if [ "${finalAttempt}" == "true" ] ; then
failedRetryDownload "${remote_url}" "Filesize not found!" ""
fi
echo -e "${YELLOW}| Filesize not found… retry${NC}"
echo -e "${YELLOW}| Filesize not found…${NC}"
return 1
else
file_size_readable="$(numfmt --to=iec --from=auto --format "%.2f" <<< "$file_size_bytes")"
@ -320,7 +324,7 @@ snow_GetFile() {
trap "rm -f ${WorkDir}/.flocks/${CLEANSTRING}; rm -f ${snow_cookie_jar}; rm -f $flockDownload; echo ""; tput cnorm; exit" 0 1 2 3 6 15
if [ "${UseTorCurlImpersonate}" == "true" ]; then
if [ "${RateMonitorEnabled}" == "true" ]; then
tor_curl_request --insecure -L --no-alpn \
tor_curl_request_extended --insecure -L --no-alpn \
--speed-limit $DownloadSpeedMin --speed-time $DownloadTimeoutInterval \
-H "Host: $fshost" \
-H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" \