# 2025.02.25 - [mad + allhosts] Re-engineer BadHtml scan to only scan the first 10kb of downloaded partials

# 2025.02.24 - [pixeldrain] Update "The file is IP limited" response handling retry
# 2025.02.22 - [blackcloud_onion] Add bcloud.onion download handling (url fixing)
# 2025.02.21 - [anonfile] Update cdn link parsing to handle new subdomains
# 2025.02.21 - [anonfile] Add download limit reached response handling
# 2025.02.21 - [anonfile] Update file info retrieval (head no longer responds)
# 2025.02.21 - [sendspace] Add sendspace.com as download host
# 2025.02.21 - [oshi / up_oshi] Revert /nossl/ changes for oshi.at (clearnet)
This commit is contained in:
kittykat 2025-02-26 12:00:57 +00:00
parent 6f338dec65
commit 83d17967d6
Signed by: kittykat
GPG key ID: E3F1556620F70C3C
54 changed files with 1316 additions and 822 deletions

View file

@ -339,7 +339,7 @@ ns_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -1,6 +1,6 @@
#! Name: anonfile.sh
#! Author: kittykat
#! Version: 2025.01.13
#! Version: 2025.02.21
#! Desc: Add support for downloading and processing of urls for a new host
#! Usage: Copy this file into the ./${ScriptDir}/hosts/ folder
#!
@ -381,6 +381,21 @@ anon_FetchFileInfo() {
continue
fi
fi
if grep -Eqi 'You have reached the download-limit' <<< "$response"; then
if [[ $i == $maxfetchretries ]] ; then
rm -f "${anon_cookie_jar}";
printf "\\n"
echo -e "${RED}| Failed to extract download link [limit].${NC}"
warnAndRetryUnknownError=true
if [[ "${finalAttempt}" == "true" ]] ; then
failedRetryDownload "${remote_url}" "Failed to extract download link [limit]" ""
fi
return 1
else
tor_identity="${RANDOM}"
continue
fi
fi
if grep -Eqi 'Just a moment...' <<< "$response"; then
if [[ $i == $maxfetchretries ]] ; then
rm -f "${anon_cookie_jar}";
@ -411,18 +426,25 @@ anon_FetchFileInfo() {
continue
fi
fi
if grep -Eqi '<a class="stretched-link" href="https://anonfile.de' <<< "$response"; then
if grep -Eqi 'File Download Link Generated' <<< "$response" && grep -Eqi 'bytes\)</small>' <<< "$response" ; then
file_size_bytes=$(grep -oPi -m 1 '(?<= <small>\().*?(?= bytes\)</small>.*$)' <<< "$response")
file_size_bytes=${file_size_bytes//[$'\t\r\n']}
fi
if [[ -z "$file_size_bytes" ]]; then
printf "\\n"
echo -e "${RED}| Failed to extract file info [3]${NC}"
warnAndRetryUnknownError=true
if [[ "${finalAttempt}" == "true" ]] ; then
failedRetryDownload "${remote_url}" "Failed to extract file info [3]" ""
fi
return 1
fi
if grep -Eqi '<a class="stretched-link" href="https:' <<< "$response"; then
printf "\\n"
echo -e "${GREEN}| Download url found [1]${NC}"
download_url=$(grep -oP '(?<=<a class="stretched-link" href=").*?(?=">.*$)' <<< "$response")
filename="${download_url##*\/}"
download_url=$(urlencode_literal_grouped_case_urlendingonly "$download_url")
elif grep -Eqi '<a class="stretched-link" href="' <<< "$response"; then
printf "\\n"
echo -e "${GREEN}| Download url found [2]${NC}"
download_url=$(grep -oP '(?<=<a class="stretched-link" href=").*?(?=">.*$)' <<< "$response")
filename="${download_url##*\/}"
download_url=$(urlencode_literal_grouped_case_urlendingonly "$download_url")
fi
if [[ -z "$download_url" ]] ; then
if [[ $i == $maxfetchretries ]] ; then
@ -443,68 +465,6 @@ anon_FetchFileInfo() {
fi
done
rm -f "${anon_cookie_jar}";
echo -e "${GREEN}# Fetching file info…${NC}"
maxfetchretries=3
for ((j=1; j<=$maxfetchretries; j++)); do
printf " ."
CLEANSTRING=${remote_url//[^a-zA-Z0-9]/}
trap "rm -f ${WorkDir}/.flocks/${CLEANSTRING}; rm -f ${anon_cookie_jar}; echo ""; tput cnorm; exit" 0 1 2 3 6 15
GetRandomUA
file_header=$(tor_curl_request -i -s --head \
--referer "${fixed_url}" \
"$download_url")
if [[ "${DebugAllEnabled}" == "true" ]] ; then
debugHtml "${remote_url##*/}" "anon_head$j" "download_url: ${download_url}"$'\n'"${file_header}"
fi
if [[ -z $file_header ]] ; then
if [[ $j == $maxfetchretries ]] ; then
rm -f "${anon_cookie_jar}";
printf "\\n"
echo -e "${RED}| Failed to extract file info${NC}"
warnAndRetryUnknownError=true
if [[ "${finalAttempt}" == "true" ]] ; then
failedRetryDownload "${remote_url}" "Failed to extract file info" ""
fi
return 1
else
tor_identity="${RANDOM}"
continue
fi
fi
if ! grep -Eqi 'HTTP/2 200|HTTP/1.1 200|200 OK' <<< $file_header ; then
if [[ $j == $maxfetchretries ]] ; then
rm -f "${anon_cookie_jar}";
printf "\\n"
echo -e "${RED}| Failed to extract file info${NC}"
warnAndRetryUnknownError=true
if [[ "${finalAttempt}" == "true" ]] ; then
failedRetryDownload "${remote_url}" "" ""
fi
return 1
else
tor_identity="${RANDOM}"
continue
fi
fi
file_size_bytes=$(grep -oPi '(?<=content-length: ).*' <<< "$file_header")
file_size_bytes=${file_size_bytes//[$'\t\r\n']}
if [[ -z "$file_size_bytes" ]]; then
if [[ $j == $maxfetchretries ]] ; then
rm -f "${anon_cookie_jar}";
printf "\\n"
echo -e "${RED}| Failed to extract file size.${NC}"
warnAndRetryUnknownError=true
if [[ "${finalAttempt}" == "true" ]] ; then
failedRetryDownload "${remote_url}" "" ""
fi
return 1
else
tor_identity="${RANDOM}"
continue
fi
fi
break #Good to go here
done
touch "${WorkDir}/.flocks/${remote_url//[^a-zA-Z0-9]/}"
if [[ ! "$filename_override" == "" ]] ; then
filename="$filename_override"
@ -607,7 +567,7 @@ anon_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -278,7 +278,7 @@ ansh_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -240,7 +240,7 @@ atea_GetFile() {
--output "$file_path" --output "$file_path"
fi
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - 0))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -318,7 +318,7 @@ bd_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -245,12 +245,25 @@ bite_GetFile() {
continue
fi
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
received_file_size=0
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true
fi
if [[ "$containsHtml" == "true" ]]; then
if grep -Eqi 'was removed|no such file|was deleted|not found|banned' < "$file_path" ; then
printf "\\n"
echo -e "${RED}| The file was not found or has been removed.${NC}"
rm -f "${file_path}"
rm -f "$flockDownload";
removedDownload "${remote_url}" "The file was not found or has been removed."
exitDownloadNotAvailable=true
return 1
fi
echo -e "${YELLOW}Download Failed (contains html)${NC} partial removed..."
rm -f "${file_path}"
if ((j >= $MaxDownloadRetries)) ; then
@ -276,7 +289,7 @@ bite_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

38
hosts/blackcloud_onion.sh Normal file
View file

@ -0,0 +1,38 @@
#! Name: blackcloud_onion.sh
#! Author: kittykat
#! Version: 2025.02.22
#! Desc: Add support for downloading and processing of urls for a new host
#! Usage: Copy this file into the ./${ScriptDir}/hosts/ folder
#!
#!
#! ------------ REQUIRED SECTION ---------------
#! @[UPDATE] HostAndDomainRegexes: This string is loaded into mad.sh and allows dynamic handling of new url data
#! Format: '/HostCode/HostNick/HostFuncPrefix:HostDomainRegex@'
#! HostCode: <aUniqueCodeForHost> (ie. 'fh' for filehaus -- cannot be used by other hosts)
#! HostNick: What is displayed throughout MAD output (ie. 'filehaus' -- "urls.txt has 10 filehaus.." will be displayed)
#! HostFuncPrefix: <aUniqueStringThatMustPrefixHostFunctions> (ie. 'fh' -- fh_DownloadFile(), fh_FetchFileInfo() .. )
#! * Note: Must begin with a letter a-z (functions beginning with numbers are no bueno)
#! HostDomainRegex: The regex used to verify matching urls
HostCode='bcloud'
HostNick='blackcloud'
HostFuncPrefix='bcloud'
HostUrls='bcloudwenjxgcxjh6uheyt72a5isimzgg4kv5u74jb2s22y3hzpwh6id.onion'
HostDomainRegex='^(http|https)://bcloudwenjxgcxjh6uheyt72a5isimzgg4kv5u74jb2s22y3hzpwh6id\.onion/(d1|dl)/'
#!
#! !! DO NOT UPDATE OR REMOVE !!
#! This merges the Required HostAndDomainRegexes into mad.sh
ListHostAndDomainRegexes=${ListHostAndDomainRegexes}'/'${HostCode}'/'${HostNick}'/'${HostFuncPrefix}'/'${HostUrls}':'${HostDomainRegex}'@'
#!
#!
#! ------------ (1) Host Main Download Function --------------- #
#!
#! This is a direct= download host, so all the functions are already in mad.sh
#! Since the HostFuncPrefix is defined above as "direct", nothing further needs to be done as it will
#! call the direct_DownloadFile() function already in mad.sh
bcloud_DownloadFile() {
local pUrl="$1"
local pFileCnt="$2"
local pFileUrl="${pUrl//bcloudwenjxgcxjh6uheyt72a5isimzgg4kv5u74jb2s22y3hzpwh6id\.onion\/d1/bcloudwenjxgcxjh6uheyt72a5isimzgg4kv5u74jb2s22y3hzpwh6id\.onion\/dl}"
echo -e "[${BLUE}ModifiedUrl${NC}]: ${pFileUrl}"
direct_DownloadFile "$pUrl" "$pFileCnt" "$pFileUrl"
}

View file

@ -347,7 +347,7 @@ bow_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -587,7 +587,7 @@ click_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -546,7 +546,7 @@ daily_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -541,7 +541,7 @@ dash_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -399,7 +399,7 @@ dup_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -450,7 +450,7 @@ desi_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -433,7 +433,7 @@ dosya_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -315,7 +315,7 @@ dgg_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

2
hosts/examples/ExampleNewHost.sh Normal file → Executable file
View file

@ -204,7 +204,7 @@ fh_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

0
hosts/examples/up_example.sh Normal file → Executable file
View file

View file

@ -492,7 +492,7 @@ fb_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -192,7 +192,7 @@ fd_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -504,7 +504,7 @@ fdot_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -196,7 +196,7 @@ fh_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -340,7 +340,7 @@ fs_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -422,7 +422,7 @@ gofile_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -326,7 +326,7 @@ hex_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -217,7 +217,7 @@ inno_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -373,7 +373,11 @@ isup_GetFile() {
continue
fi
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
received_file_size=0
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true
@ -404,7 +408,7 @@ isup_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -291,7 +291,7 @@ kraken_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -282,7 +282,7 @@ mfire_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -305,7 +305,7 @@ nippy_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -1,6 +1,6 @@
#! Name: oshi.sh
#! Author: kittykat
#! Version: 2025.02.17
#! Version: 2025.02.21
#! Desc: Add support for downloading and processing of urls for a new host
#! Usage: Copy this file into the ./${ScriptDir}/hosts/ folder
#!
@ -96,11 +96,10 @@ oshi_FetchFileInfo() {
elif [[ "${OshiBaseUrlOverride}" == "oshionion" ]]; then
download_url=${remote_url//oshi\.at/5ety7tpkim5me6eszuwcje7bmy25pbtrjtue7zkqqgziljwqy3rrikqd\.onion}
fi
if ! grep -Eqi '/nossl/' <<< "$download_url"; then
download_url=${download_url//oshi\.at/oshi\.at\/nossl}
if ! grep -Eqi '/nossl/' <<< "$download_url" && grep -Eqi '5ety7tpkim5me6eszuwcje7bmy25pbtrjtue7zkqqgziljwqy3rrikqd/' <<< "$download_url" ; then
download_url=${download_url//5ety7tpkim5me6eszuwcje7bmy25pbtrjtue7zkqqgziljwqy3rrikqd\.onion/5ety7tpkim5me6eszuwcje7bmy25pbtrjtue7zkqqgziljwqy3rrikqdi\.onion\/nossl}
fi
if grep -Eqi '^https' <<< "$download_url"; then
if grep -Eqi '^https' <<< "$download_url" && grep -Eqi '5ety7tpkim5me6eszuwcje7bmy25pbtrjtue7zkqqgziljwqy3rrikqd/' <<< "$download_url" ; then
download_url=${download_url//https:/http:}
fi
download_url=$(urlencode_literal_grouped_case_urlendingonly "$download_url")
@ -199,15 +198,15 @@ oshi_GetFile() {
CLEANSTRING=${remote_url//[^a-zA-Z0-9]/}
trap "rm -f ${WorkDir}/.flocks/${CLEANSTRING}; rm -f $flockDownload; echo ""; tput cnorm; exit" 0 1 2 3 6 15
if [[ "${RateMonitorEnabled}" == "true" ]]; then
tor_curl_request --insecure --speed-limit $DownloadSpeedMin --speed-time $DownloadTimeoutInterval --referer "$file_url" "$download_url" --continue-at - --output "$file_path"
tor_curl_request --insecure -L --speed-limit $DownloadSpeedMin --speed-time $DownloadTimeoutInterval --referer "$file_url" "$download_url" --continue-at - --output "$file_path"
else
tor_curl_request --insecure --referer "$file_url" "$download_url" --continue-at - --output "$file_path"
tor_curl_request --insecure -L --referer "$file_url" "$download_url" --continue-at - --output "$file_path"
fi
received_file_size=0
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -1,6 +1,6 @@
#! Name: pixeldrain.sh
#! Author: kittykat
#! Version: 2024.09.13
#! Version: 2025.02.24
#! Desc: Add support for downloading and processing of urls for a new host
#! Usage: Copy this file into the ./${ScriptDir}/hosts/ folder
#!
@ -194,13 +194,16 @@ pd_FetchFileInfo() {
return 1
fi
elif grep -i -Eq "ip_download_limited_captcha_required" <<< "$response"; then
if ((i > 1)) ; then
if ((i >= 5)) ; then
printf "\\n"
echo -e "${RED}| Failed: The file is IP limited… (used max bandwidth/48hr, try again later)${NC}"
exitDownloadNotAvailable=true
failedRetryDownload "${remote_url}" "Captcha IP Limited (used max bandwidth/48hr, try again later)" ""
return 1
else
printf " ."
continue
fi
echo -e "${RED}| Failed: The file is IP limited… (used max bandwidth/48hr, try again later)${NC}"
exitDownloadNotAvailable=true
failedRetryDownload "${remote_url}" "Captcha IP Limited (used max bandwidth/48hr, try again later)" ""
return 1
elif ! grep -q -Eqi '"availability":""' <<< "$response"; then
pd_message=$(grep -o -P '(?<="availability":").+?(?=")' <<< "$response")
if ((i > 1)) ; then
@ -352,7 +355,7 @@ pd_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -181,7 +181,7 @@ qx_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -312,7 +312,7 @@ rz_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -405,7 +405,7 @@ snow_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

401
hosts/sendspace.sh Executable file
View file

@ -0,0 +1,401 @@
#! Name: sendspace.sh
#! Author: kittykat
#! Version: 2025.02.21
#! Desc: Add support for downloading and processing of urls for a new host
#! Usage: Copy this file into the ./${ScriptDir}/hosts/ folder
#!
#!
#! ------------ REQUIRED SECTION ---------------
#! @[UPDATE] HostAndDomainRegexes: This string is loaded into mad.sh and allows dynamic handling of new url data
#! Format: '/HostCode/HostNick/HostFuncPrefix:HostDomainRegex@'
#! HostCode: <aUniqueCodeForHost> (ie. 'fh' for filehaus -- cannot be used by other hosts)
#! HostNick: What is displayed throughout MAD output (ie. 'filehaus' -- "urls.txt has 10 filehaus.." will be displayed)
#! HostFuncPrefix: <aUniqueStringThatMustPrefixHostFunctions> (ie. 'fh' -- fh_DownloadFile(), fh_FetchFileInfo() .. )
#! * Note: Must begin with a letter a-z (functions beginning with numbers are no bueno)
#! HostDomainRegex: The regex used to verify matching urls
HostCode='ss'
HostNick='sendspace'
HostFuncPrefix='ss'
HostUrls='sendspace.com'
HostDomainRegex='^(http|https)://(.*\.)?sendspace\.com/file/'
#!
#! !! DO NOT UPDATE OR REMOVE !!
#! This merges the Required HostAndDomainRegexes into mad.sh
ListHostAndDomainRegexes=${ListHostAndDomainRegexes}'/'${HostCode}'/'${HostNick}'/'${HostFuncPrefix}'/'${HostUrls}':'${HostDomainRegex}'@'
#!
#!
#! ------------ (1) Host Main Download Function --------------- #
#!
#! @REQUIRED: Host Main Download function
#! Must be named specifically as such:
#! <HostFuncPrefix>_DownloadFile()
ss_DownloadFile() {
local remote_url=${1}
local file_url=${1}
local filecnt=${2}
warnAndRetryUnknownError=false
exitDownloadError=false
exitDownloadNotAvailable=false
fileAlreadyDone=false
download_inflight_path="${WorkDir}/.inflight/"
mkdir -p "$download_inflight_path"
completed_location="${WorkDir}/downloads/"
tor_identity="${RANDOM}"
finalAttempt="false"
for ((z=0; z<=$MaxUrlRetries; z++)); do
if [[ $z -eq $MaxUrlRetries ]] ; then
finalAttempt="true"
fi
CLEANSTRING=${remote_url//[^a-zA-Z0-9]/}
trap "rm -f ${WorkDir}/.flocks/${CLEANSTRING}; echo ""; tput cnorm; exit" 0 1 2 3 6 15
if ss_FetchFileInfo $finalAttempt && ss_GetFile "${filecnt}" $((z+1)) $finalAttempt ; then
return 0
elif [[ $z -lt $MaxUrlRetries ]]; then
if [[ "${fileAlreadyDone}" == "true" ]] ; then
break
fi
if [[ "${warnAndRetryUnknownError}" == "true" ]] ; then
if [[ "${DebugAllEnabled}" == "true" ]] ; then
debugHtml "${remote_url##*/}" "error" "Retry due to an unknown issue: attempt #$((z+1)) of ${MaxUrlRetries}"
fi
fi
if [[ "${exitDownloadError}" == "true" || "${exitDownloadNotAvailable}" == "true" ]] ; then
if [[ "${DebugAllEnabled}" == "true" ]] ; then
debugHtml "${remote_url##*/}" "error" "Exit due to unrecoverable issue"
fi
rm -f "${WorkDir}/.flocks/${remote_url//[^a-zA-Z0-9]/}"
break
fi
echo -e "\n${YELLOW}A recoverable error occurred, retry attempt $((z+1))/${MaxUrlRetries}${NC}"
sleep 3
fi
done
rm -f "${WorkDir}/.flocks/${remote_url//[^a-zA-Z0-9]/}"
}
#!
#! ------------- (2) Fetch File Info Function ----------------- #
#!
ss_FetchFileInfo() {
finalAttempt=$1
maxfetchretries=5
ss_cookie_jar=""
echo -e "${GREEN}# Fetching download link…${NC}"
for ((i=1; i<=$maxfetchretries; i++)); do
mkdir -p "${WorkDir}/.temp"
ss_cookie_jar=$(mktemp "${WorkDir}/.temp/ss_cookies""${instance_no}"".XXXXXX")
printf " ."
tor_identity="${RANDOM}"
CLEANSTRING=${remote_url//[^a-zA-Z0-9]/}
trap "rm -f ${WorkDir}/.flocks/${CLEANSTRING}; rm -f "${ss_cookie_jar}"; echo ""; tput cnorm; exit" 0 1 2 3 6 15
response=$(tor_curl_request --insecure -L -s -b "${ss_cookie_jar}" -c "${ss_cookie_jar}" "$remote_url")
if [[ "${DebugAllEnabled}" == "true" ]] ; then
debugHtml "${remote_url##*/}" "ss_dwnpage$i" "${response}"
fi
if [[ -z $response ]] ; then
rm -f "${ss_cookie_jar}";
if [[ $i == $maxfetchretries ]] ; then
printf "\\n"
echo -e "${RED}| Failed to extract download link.${NC}"
warnAndRetryUnknownError=true
if [[ "${finalAttempt}" == "true" ]] ; then
failedRetryDownload "${remote_url}" "" ""
fi
return 1
else
continue
fi
fi
if grep -Eqi "banned your IP|IP has been banned|you are banned" <<< "$response"; then
rm -f "${ss_cookie_jar}";
if [[ $i == $maxfetchretries ]] ; then
printf "\\n"
echo -e "${RED}| Blocked ip${NC}"
warnAndRetryUnknownError=true
if [[ "${finalAttempt}" == "true" ]] ; then
failedRetryDownload "${remote_url}" "Blocked ip" ""
fi
return 1
else
continue
fi
fi
if grep -Eqi "no such file|File was deleted|File not found" <<< "$response"; then
rm -f "${ss_cookie_jar}";
printf "\\n"
echo -e "${RED}| The file was not found. It could be deleted or expired.${NC}"
exitDownloadError=true
removedDownload "${remote_url}"
return 1
fi
if grep -Eqi 'class="download_page_button button1" href="https://' <<< "$response"; then
download_url=$(grep -oPi '(?<=class="download_page_button button1" href=").*?(?=" onclick=".*$)' <<< "$response")
filename="${download_url##*/}"
filename=${filename//[$'\t\r\n']}
download_url=$(urlencode_literal_grouped_case_urlendingonly ${download_url})
printf "\\n"
break
else
rm -f "${ss_cookie_jar}";
printf "\\n"
echo -e "${RED}| Failed to find download link [1]${NC}"
exitDownloadError=true
failedRetryDownload "${remote_url}" "Failed to find download link [1]" ""
return 1
fi
done
echo -e "${GREEN}# Fetching file info…${NC}"
filename=""
file_size_bytes=""
if [[ ! "$filename_override" == "" ]] ; then
filename="$filename_override"
fi
maxfetchretries=2
for ((j=1; j<=maxfetchretries; j++)); do
printf " ."
CLEANSTRING=${remote_url//[^a-zA-Z0-9]/}
trap "rm -f ${WorkDir}/.flocks/${CLEANSTRING}; rm -f ${ss_cookie_jar}; echo ""; tput cnorm; exit" 0 1 2 3 6 15
file_header=$(tor_curl_request --insecure -L --head -s \
-b "${ss_cookie_jar}" -c "${ss_cookie_jar}" \
"$download_url" | tr -d '\0')
if [[ "${DebugAllEnabled}" == "true" ]] ; then
debugHtml "${remote_url##*/}" "ss_head$j" "FileInfoUrl: ${download_url}"$'\n'"${file_header}"
fi
if [[ -z $file_header ]] ; then
if ((j == maxfetchretries)) ; then
rm -f "${ss_cookie_jar}";
printf "\\n"
echo -e "${RED}| Failed to extract file info [1]${NC}"
warnAndRetryUnknownError=true
if [[ "${finalAttempt}" == "true" ]] ; then
failedRetryDownload "${remote_url}" "Failed to extract file info [1]" ""
fi
return 1
else
continue
fi
fi
if ! grep -Eqi 'HTTP.* 200' <<< $file_header ; then
if ((j == maxfetchretries)) ; then
rm -f "${ss_cookie_jar}";
printf "\\n"
echo -e "${RED}| Failed to extract file info [2]${NC}"
warnAndRetryUnknownError=true
if [[ "${finalAttempt}" == "true" ]] ; then
failedRetryDownload "${remote_url}" "Failed to extract file info [2]" ""
fi
return 1
else
continue
fi
fi
if [[ -z $filename ]]; then
filename=$(grep -oPi '(?<=filename=").*(?=")' <<< "$file_header")
if [[ -z $filename ]]; then
filename=$(grep -oPi '(?<=filename[*]=).*' <<< "$file_header")
filename=${filename//[$'\t\r\n']}
fi
fi
if [[ -z $file_size_bytes ]] ; then
file_size_bytes=$(grep -oPi '(?<=content-length: ).*' <<< "$file_header")
file_size_bytes=${file_size_bytes//[$'\t\r\n']}
fi
if [[ -z $filename ]] || [[ -z $file_size_bytes ]] ; then
if ((j == maxfetchretries)) ; then
rm -f "${ss_cookie_jar}";
printf "\\n"
echo -e "${RED}| Failed to extract file info [3]${NC}"
warnAndRetryUnknownError=true
if [[ "${finalAttempt}" == "true" ]] ; then
failedRetryDownload "${remote_url}" "Failed to extract file info [3]" ""
fi
return 1
else
continue
fi
fi
break #Good to go here
done
rm -f "${ss_cookie_jar}";
if [[ -z $filename ]] || [[ -z $file_size_bytes ]] ; then
printf "\\n"
echo -e "${RED}| Failed to extract file info [3]${NC}"
warnAndRetryUnknownError=true
if [[ "${finalAttempt}" == "true" ]] ; then
failedRetryDownload "${remote_url}" "Failed to extract file info [3]" ""
fi
return 1
fi
touch "${WorkDir}/.flocks/${remote_url//[^a-zA-Z0-9]/}"
if [[ ! "$filename_override" == "" ]] ; then
filename="$filename_override"
fi
filename=$(sanitize_file_or_folder_name "${filename}")
printf "\\n"
echo -e "${YELLOW}| File name:${NC}\t\"${filename}\""
if [[ -z $file_size_bytes ]] ; then
if [[ "${finalAttempt}" == "true" ]] ; then
failedRetryDownload "${remote_url}" "Filesize not found!" ""
fi
echo -e "${YELLOW}| Filesize not found… retry${NC}"
return 1
else
file_size_readable="$(numfmt --to=iec --from=auto --format "%.2f" <<< "$file_size_bytes")"
fi
echo -e "${YELLOW}| File size:${NC}\t${file_size_readable}"
file_path="${download_inflight_path}${filename}"
flockDownload="${WorkDir}/.flocks/${filename//[^a-zA-Z0-9\.\_\-]/}.flock"
if CheckFileSize "${remote_url}" "${file_size_bytes}" ; then
return 1
fi
if CheckDownloadExists "$remote_url" "$MoveToFolder" "$filecnt" "$filename" "$file_path" "$completed_location" ; then
return 1
fi
echo "${remote_url//[^a-zA-Z0-9]/}" > $flockDownload
}
#!
#! ----------- (3) Fetch File / Download File Function --------------- #
#!
ss_GetFile() {
echo -e "${GREEN}# Downloading…${NC}"
echo -e "${YELLOW}| File path:${NC}\t./.inflight/${filename}\n"
fileCnt=$1
retryCnt=$2
finalAttempt=$3
flockDownload="${WorkDir}/.flocks/${filename//[^a-zA-Z0-9\.\_\-]/}.flock"
for ((j=1; j<=$MaxDownloadRetries; j++)); do
pd_presize=0
if [[ -f "$file_path" ]] ; then
pd_presize=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
GetRandomUA
CLEANSTRING=${remote_url//[^a-zA-Z0-9]/}
trap "rm -f ${WorkDir}/.flocks/${CLEANSTRING}; rm -f "${ss_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 --speed-limit $DownloadSpeedMin --speed-time $DownloadTimeoutInterval "$download_url" --continue-at - --output "$file_path"
else
tor_curl_request --insecure "$download_url" --continue-at - --output "$file_path"
fi
else
if [[ "${RateMonitorEnabled}" == "true" ]]; then
tor_curl_request --insecure --speed-limit $DownloadSpeedMin --speed-time $DownloadTimeoutInterval \
-H "User-Agent: $RandomUA" \
-H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8" \
-H "Accept-Language: en-US,en;q=0.5" \
-H "Accept-Encoding: gzip, deflate, br" \
-H "Connection: keep-alive" \
-H "Cookie: lng=eng" \
-H "Upgrade-Insecure-Requests: 1" \
-H "Sec-Fetch-Dest: document" \
-H "Sec-Fetch-Mode: navigate" \
-H "Sec-Fetch-Site: same-origin" \
-H "Sec-Fetch-User: ?1" \
--referer "$remote_url" \
--continue-at - --output "$file_path"
else
tor_curl_request --insecure \
-H "User-Agent: $RandomUA" \
-H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8" \
-H "Accept-Language: en-US,en;q=0.5" \
-H "Accept-Encoding: gzip, deflate, br" \
-H "Connection: keep-alive" \
-H "Cookie: lng=eng" \
-H "Upgrade-Insecure-Requests: 1" \
-H "Sec-Fetch-Dest: document" \
-H "Sec-Fetch-Mode: navigate" \
-H "Sec-Fetch-Site: same-origin" \
-H "Sec-Fetch-User: ?1" \
--referer "$remote_url" \
--continue-at - --output "$file_path"
fi
fi
received_file_size=0
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true
fi
downDelta=$(( received_file_size - pd_presize ))
if [[ "${received_file_size}" -ne "${file_size_bytes}" ]] || [[ "$containsHtml" == "true" ]]; then
if [[ "${AutoRepairBadPartials}" == "true" ]] && (( downDelta > 0 && downDelta < 1024 )) ; then
if [[ -f "${file_path}" ]] ; then
if ((pd_presize > 0)); then
echo -e "${YELLOW}Bad node / HTML found:${NC} reverting to previous file..."
truncateDownload "$remote_url" "$filename" "$pd_presize" "$received_file_size"
truncate -s $pd_presize "${file_path}"
else
echo -e "${YELLOW}Bad node / HTML found:${NC} tainted partial removed..."
rm -f "${file_path}"
fi
fi
if ((j >= $MaxDownloadRetries)) ; then
rm -f "$flockDownload";
if [[ "${finalAttempt}" == "true" ]] ; then
droppedSizeBadDownload "${remote_url}" "${filename}" "${received_file_size}"
fi
return 1
else
continue
fi
elif [[ "${AutoRepairBadPartials}" == "true" ]] && [[ "$containsHtml" == "true" ]] ; then
if [[ -f "${file_path}" ]] ; then
if ((pd_presize > 0)); then
echo -e "${YELLOW}Bad node / HTML found:${NC} reverting to previous file..."
truncateDownload "$remote_url" "$filename" "$pd_presize" "$received_file_size"
truncate -s $pd_presize "${file_path}"
else
echo -e "${YELLOW}Bad node / HTML found:${NC} tainted partial removed..."
rm -f "${file_path}"
fi
fi
if ((j >= $MaxDownloadRetries)) ; then
rm -f "$flockDownload";
if [[ "${finalAttempt}" == "true" ]] ; then
droppedSizeBadDownload "${remote_url}" "${filename}" "${received_file_size}"
fi
return 1
else
continue
fi
elif (( downDelta > 0 && downDelta < 1024 )) || [[ "$containsHtml" == "true" ]] ; then
if [[ -f "$file_path" ]] ; then
rm -rf "$file_path"
fi
echo -e "\n${YELLOW}Bad node / HTML found:${NC} tainted partial removed..."
if ((j >= $MaxDownloadRetries)) ; then
rm -f "$flockDownload";
if [[ "${finalAttempt}" == "true" ]] ; then
droppedSizeBadDownload "${remote_url}" "${filename}" "${received_file_size}"
fi
return 1
else
continue
fi
fi
if [[ "${received_file_size}" -ne "${file_size_bytes}" ]]; then
echo -e "\n${RED}Download failed, file is incomplete.${NC}"
if ((j >= $MaxDownloadRetries)) ; then
rm -f "$flockDownload";
if [[ "${finalAttempt}" == "true" ]] ; then
droppedSizeBadDownload "${remote_url}" "${filename}" "${received_file_size}"
fi
return 1
else
continue
fi
fi
else
break
fi
done
rm -f "$flockDownload";
rm -f "${ss_cookie_jar}";
ProcessCompletedDownload "$remote_url" "$MoveToFolder" "$filecnt" "$filename" "$file_size_bytes" "$completed_location" "$file_path"
return 0
}
#!
#! --------------- Host Extra Functions ------------------- #
#!

View file

@ -208,7 +208,7 @@ sysp_GetFile() {
--output "$file_path" --output "$file_path"
fi
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -342,7 +342,7 @@ tmpme_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -265,7 +265,7 @@ tmpsh_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -236,7 +236,7 @@ torp_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -366,7 +366,7 @@ up2share_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -1,6 +1,6 @@
#! Name: up_oshi.sh
#! Author: kittykat
#! Version: 2025.02.17
#! Version: 2025.02.21
#! Desc: Add support for uploading files to a new host
#! Info: Files are accessible at https://oshi.at/<hash>
#! MaxSize: 5GB
@ -101,7 +101,7 @@ oshi_PostFile() {
UploadTicket="${WorkDir}/.flocks/upload_${_hostCode}_${filepath//[^a-zA-Z0-9]/}"
echo -e "[${YELLOW}${_hostCode}${NC}] Uploading ${GREEN}${filename}${NC}"
tor_identity="${RANDOM}"
PostUrlHost='http://oshi.at/nossl/'
PostUrlHost='http://oshi.at/'
if [[ "$OshiUploadHostChoice" == "oshionion" ]]; then
PostUrlHost='http://5ety7tpkim5me6eszuwcje7bmy25pbtrjtue7zkqqgziljwqy3rrikqd.onion/nossl/'
fi

View file

@ -1,6 +1,6 @@
#! Name: up_ranoz.sh
#! Author: kittykat
#! Version: 2025.02.20
#! Version: 2025.02.24
#! Desc: Add support for uploading files to bedrive.ru
#! Info: Files are accessible at https://ranoz.gg/file/<file_code>
#! MaxSize: 20GB
@ -166,7 +166,7 @@ rz_PostFile() {
echo -e "| Size: ${BLUE}${filesize}${NC} bytes${NC}"
echo -e "| Link: ${YELLOW}${downloadLink}${NC}"
if [[ "$RanozRandomizeExt" == "true" ]]; then
successUpload "$pline" "${filepath}" "${_hostCode}" "${filesize}" "${downloadLink}" "{$response}" "[rand ext, rename to $filename or use MAD v2025.02.13+]"
successUpload "$pline" "${filepath}" "${_hostCode}" "${filesize}" "${downloadLink}" "{$response}" "[rename to $filename or use MAD script]"
else
successUpload "$pline" "${filepath}" "${_hostCode}" "${filesize}" "${downloadLink}" "{$response}"
fi

2
hosts/up_sendnow.sh Executable file → Normal file
View file

@ -94,7 +94,7 @@ snow_PostFile() {
local finalAttempt=$6
local pline=${7}
UploadTicket="${WorkDir}/.flocks/upload_${_hostCode}_${filepath//[^a-zA-Z0-9]/}"
echo -e "[${YELLOW}${_hostCode}${NC}] Finding good Tor node{NC}"
echo -e "[${YELLOW}${_hostCode}${NC}] Finding good Tor node${NC}"
for ((i=0; i<=15; i++)); do
tor_identity="${RANDOM}"
trap "rm -f ${UploadTicket}; echo ""; tput cnorm; exit" 0 1 2 3 6 15

View file

@ -1,6 +1,6 @@
#! Name: up_uploadhive.sh
#! Author: kittykat
#! Version: 2025.02.20
#! Version: 2025.02.24
#! Desc: Add support for uploading files to uploadhive.com
#! Info: Files are accessible at https://uploadhive.com/<file_code>
#! MaxSize: 5GB
@ -154,7 +154,7 @@ uhive_PostFile() {
echo -e "| Size: ${BLUE}${filesize}${NC} bytes${NC}"
echo -e "| Link: ${YELLOW}${downloadLink}${NC}"
if [[ "$UploadHiveRandomizeExt" == "true" ]]; then
successUpload "$pline" "${filepath}" "${_hostCode}" "${filesize}" "${downloadLink}" "{$response}" "[rand ext, rename to $filename or use MAD v2025.02.13+]"
successUpload "$pline" "${filepath}" "${_hostCode}" "${filesize}" "${downloadLink}" "{$response}" "[rename to $filename or use MAD script]"
else
successUpload "$pline" "${filepath}" "${_hostCode}" "${filesize}" "${downloadLink}" "{$response}"
fi

View file

@ -301,7 +301,7 @@ upee_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -413,7 +413,7 @@ upev_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -291,7 +291,7 @@ uflix_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -252,7 +252,7 @@ uhive_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true

View file

@ -281,7 +281,7 @@ youd_GetFile() {
if [[ -f "$file_path" ]] ; then
received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
fi
if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
if CheckNoHtml "$remote_url" "$filename" "$file_path" "$((received_file_size - pd_presize))" ; then
containsHtml=false
else
containsHtml=true