# 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

18
hosts/up_uploadhive.sh Normal file → Executable file
View file

@ -1,6 +1,6 @@
#! Name: up_uploadhive.sh
#! Author: kittykat
#! Version: 2024.12.25
#! Version: 2025.02.14
#! Desc: Add support for uploading files to uploadhive.com
#! Info: Files are accessible at https://uploadhive.com/<file_code>
#! MaxSize: 5GB
@ -100,6 +100,7 @@ uhive_PostFile() {
if [[ "$UploadHiveRandomizeExt" == "true" ]]; then
randomext=$(mktemp -u XXX)
randomext=${randomext,,}
echo -e "${BLUE}MAD Randomized Extension: $randomext${NC}"
origext=${filepath##*.}
if [[ "$origext" == "7z" ]]; then
tmpfilepath="${filepath%.*}--7_.${randomext}"
@ -119,12 +120,13 @@ uhive_PostFile() {
else
tmpfilepath="${filepath%.*}--${origext}_.${randomext}"
fi
mv $filepath $tmpfilepath
echo -e "Creating temp random ext file..."
cp $filepath $tmpfilepath
else
tmpfilepath=$filepath
fi
arrFiles=("$filepath")
trap "rm -f ${UploadTicket}; echo ""; tput cnorm; exit" 0 1 2 3 6 15
arrFiles=("$tmpfilepath")
trap "rm -f ${UploadTicket}; echo ""; rm -f $tmpfilepath; tput cnorm; exit" 0 1 2 3 6 15
response=$(tor_curl_upload --insecure -i \
-H "Content-Type: multipart/form-data" \
-F "sess_id=" \
@ -141,7 +143,7 @@ uhive_PostFile() {
debugHtml "${filepath##*/}" "${_hostCode}_upload" "post_url: ${PostUrlHost}"$'\n'"${response}"
fi
if [[ "$UploadHiveRandomizeExt" == "true" ]]; then
mv $tmpfilepath $filepath
rm -f $tmpfilepath;
fi
if grep -Eqi '"file_status":"OK"' <<< "${response}" ; then
hash=$(grep -oPi '(?<=file_code":").*?(?=".*$)' <<< "$response")
@ -150,7 +152,11 @@ uhive_PostFile() {
echo -e "${GREEN}| Upload Success${NC}"
echo -e "| Size: ${BLUE}${filesize}${NC} bytes${NC}"
echo -e "| Link: ${YELLOW}${downloadLink}${NC}"
successUpload "$pline" "${filepath}" "${_hostCode}" "${filesize}" "${downloadLink}" "{$response}"
if [[ "$UploadHiveRandomizeExt" == "true" ]]; then
successUpload "$pline" "${filepath}" "${_hostCode}" "${filesize}" "${downloadLink}" "{$response}" "[rand ext, rename to $filename or use MAD v2025.02.13+]"
else
successUpload "$pline" "${filepath}" "${_hostCode}" "${filesize}" "${downloadLink}" "{$response}"
fi
return 0
else
err=$(grep -oPi '(?<="file_status":").*?(?=".*$)' <<< "$response")