# 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

@ -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