# 2025.02.12 - [sendnow] Add send.now as download host

# 2025.02.11 - [ranoz] Fix filename (to handle fileid added to download urls)
# 2025.02.10 - [mad] Add detection of custom "Removed" response on cdn get from direct links
# 2025.02.06 - [ranoz] Add UNAVAILABLE_FOR_LEGAL_REASONS response handling
# 2025.02.04 - [mad] Add ConnectTimeoutUpload to separate configurable up/down timeouts
This commit is contained in:
kittykat 2025-02-12 01:05:10 +00:00
parent fd4723eb24
commit 0face871aa
Signed by: kittykat
GPG key ID: E3F1556620F70C3C
12 changed files with 1359 additions and 561 deletions

98
mad.sh
View file

@ -30,9 +30,15 @@
#
# * Everyone who provided feedback and helped test.. and those who wish to remain anonymous
ScriptVersion=2025.02.02
ScriptVersion=2025.02.12
#=================================================
# Recent Additions
# 2025.02.12 - [sendnow] Add send.now as download host
# 2025.02.11 - [ranoz] Fix filename (to handle fileid added to download urls)
# 2025.02.10 - [mad] Add detection of custom "Removed" response on cdn get from direct links
# 2025.02.06 - [ranoz] Add UNAVAILABLE_FOR_LEGAL_REASONS response handling
# 2025.02.04 - [mad] Add ConnectTimeoutUpload to separate configurable up/down timeouts
# 2025.02.03 - [up_lainsafe] Add pomf2.lain.la as upload host (1GB)
# 2025.02.02 - [mad] Add function to handle urlencode of cyrillic / kanji / latin / etc
# 2025.02.02 - [ranoz] Fix handling filenames containing cyrillic / kanji / latin chars
# 2025.02.02 - [all] Reduced character processing for urlencode to special url characters
@ -53,60 +59,6 @@ ScriptVersion=2025.02.02
# 2025.01.13 - [anonfile, dailyuploads] Update ocr call to use tesseract function
# 2025.01.13 - [up_anonfile] Modify to use new upload url
# 2025.01.12 - [ateasystems] Update 404 Not found response
# 2025.01.11 - [mad] Update direct head response handling
# 2025.01.11 - [ranoz] Add 404 Not found handling on head
# 2025.01.09 - [ranoz] Add handling of "NEXT_NOT_FOUND" response
# 2025.01.09 - [fileblade] Fix cdn url parsing
# 2025.01.08 - [up_pixeldrain] Fix success response from pixeldrain
# 2025.01.08 - [ramsgaard / up_ramsgaard] Add data.ramsgaard.me as upload / download host
# 2025.01.08 - [euromussels / up_euromussels] Add uploads.euromussels.eu as upload / download host
# 2025.01.07 - [up_fileland] Add fileland.io as upload host
# 2025.01.07 - [up_fireget] Add fireget.com as upload host
# 2025.01.06 - [uploadhive] Update the removed / gone response detection
# 2025.01.06 - [fileblade] Add "user does not allow free downloads over 100MB" response (and warnings)
# 2025.01.06 - [desiupload] Add desiupload as download host
# 2025.01.05 - [isupload] Fix filename detection
# 2024.01.03 - [gofile] Detect "Bulk download is a Premium feature" response (no children)
# 2025.01.02 - [up_axfc] Update PUT response check to handle kanji chars (remove)
# 2025.01.02 - [dashfile] Add response 'This file reached max downloads limit'. New cookie on captcha fail
# 2024.12.28 - [dashfile] Update captcha code check
# 2024.12.28 - [anonfile] Add new download link href response
# 2024.12.28 - [fileblade] Add additional response handling (subsequent downloads, unknown warnings)
# 2024.12.28 - [eternalhosting] Update eternal.onion to handle landing page (eternal.onion/file/)
# 2024.12.26 - [up_kouploader / up_axfc / up_torup] Fixed failedRetryUpload (was using download logging)
# * Thanks Belky
# 2024.12.26 - [anonfile / up_anonfile] Add anonfile.de as upload / download host
# 2024.12.25 - [dashfile / up_dashfile] Add dashfile.net as upload / download host
# 2024.12.25 - [isupload] Change to use tor_curl_request_extended (server response is often slow)
# - Accept 200 OK response to continue (do not require filename / filesize)
# 2024.12.25 - [fileblade] Add response handling for free file download dissallowed > 100MB.
# "The file owner does not allow FREE users to download files which are over 100 MB"
# 2024.12.25 - [mad] Add "UploadHiveRandomizeExt" option to config with default=true
# 2024.12.25 - [uploadhive / up_uploadhive] Update renaming random ext files to their original names
# - Handle multipart 7z & rar (abc.7z.###, abc.part#.rar)
# 2024.12.25 - [syspro / up_syspro] Add share.syspro.com.br as upload / download host
# 2024.12.24 - [mad] Add EnabledUploadHosts / EnabledDownloadHosts setting to fine-tune which hosts to use
# ** Options: recommended, online, all (Default=recommended)
# - recommended: loads all hosts verified working with MAD
# - online: loads all hosts available online / working (includes captcha / js restricted)
# - all: loads all hosts in hosts folder
# 2024.12.24 - [up_ateasystems / ateasystems] Add share.ateasystems.com as upload / download host
# 2024.12.23 - [up_uploadbay / uploadbay] Add uploadbay.net as upload / download host
# 2024.12.23 - [up_herbolistique / herbolistique] Add transfert.herbolistique.com as upload / download host
# 2024.12.23 - [uploadhive] Auto-rename random extension downloads
# 2024.12.23 - [up_uploadhive] Change upload file extension to random 3 letters (uhive blocks .7z, .zip, .rar now)
# 2024.12.23 - [up_offshorecat] Fixed upload. Updated apikey.
# 2024.12.23 - [up_fileditch] Fixed upload. Added response handling for Tor Blocked node (retries)
# 2024.12.23 - [up_freesocial / freesocial] Add files.freesocial.co as upload / download host
# 2024.12.23 - [up_cyssoux / cyssoux] Add partage.cyssoux.fr as upload / download host
# 2024.12.22 - [mad] Add jira_Upload function -- used for all jirafeau hosts
# 2024.12.22 - [up_*AllJiraHosts*] Consolidated / moved all hosts upload functions to mad.sh
# - Minimized jira host code (~6000 lines of duplicates removed)
# - Jira hosts: acid, anarchaserver, depotkaz, dictvm, eddowding, familleflender, filesquid,
# free4e, harrault, linxx, moocloud, nantes, netlib, skrepr, soyjak
# 2024.12.20 - [fileblade / up_fileblade] Add fileblade.com as upload / download host
# 2024.12.20 - [isupload / up_isupload] Add isupload.com as upload / download host
# 2024.12.15 - [mediafire] Add mediafire download link processing
# -- See ./documentation/!Changelog (Historical).txt for further changes -- #
@ -179,6 +131,10 @@ EnabledDownloadHosts="recommended"
# UPLOAD SECTION
#-------------------
# Connection attempt timeout (tor_curl/tor_curl_impersonate)
# @Default=15
ConnectTimeoutUpload=15
# Upload file retries per host when uploading
# @Default=4
MaxUploadRetries=4
@ -434,15 +390,15 @@ tor_curl_request_extended() {
tor_curl_upload() {
if [ "${UseTorCurlImpersonate}" == "true" ]; then
if [ "${RateMonitorEnabled}" == "true" ]; then
"${curl_impersonate[@]}" --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeout} --speed-limit $UploadSpeedMin --speed-time $UploadTimeoutInterval --compressed --globoff "$@"
"${curl_impersonate[@]}" --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeoutUpload} --speed-limit $UploadSpeedMin --speed-time $UploadTimeoutInterval --compressed --globoff "$@"
else
"${curl_impersonate[@]}" --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeout} --compressed --globoff "$@"
"${curl_impersonate[@]}" --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeoutUpload} --compressed --globoff "$@"
fi
else
if [ "${RateMonitorEnabled}" == "true" ]; then
curl --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeout} --speed-limit $UploadSpeedMin --speed-time $UploadTimeoutInterval -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/115.0' -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 'Origin: null' -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Sec-Fetch-Dest: document' -H 'Sec-Fetch-Mode: navigate' -H 'Sec-Fetch-Site: cross-site' -H 'Sec-Fetch-User: ?1' -H 'TE: trailers' --compressed --globoff "$@"
curl --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeoutUpload} --speed-limit $UploadSpeedMin --speed-time $UploadTimeoutInterval -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/115.0' -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 'Origin: null' -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Sec-Fetch-Dest: document' -H 'Sec-Fetch-Mode: navigate' -H 'Sec-Fetch-Site: cross-site' -H 'Sec-Fetch-User: ?1' -H 'TE: trailers' --compressed --globoff "$@"
else
curl --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeout} -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/115.0' -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 'Origin: null' -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Sec-Fetch-Dest: document' -H 'Sec-Fetch-Mode: navigate' -H 'Sec-Fetch-Site: cross-site' -H 'Sec-Fetch-User: ?1' -H 'TE: trailers' --compressed --globoff "$@"
curl --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeoutUpload} -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/115.0' -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 'Origin: null' -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Sec-Fetch-Dest: document' -H 'Sec-Fetch-Mode: navigate' -H 'Sec-Fetch-Site: cross-site' -H 'Sec-Fetch-User: ?1' -H 'TE: trailers' --compressed --globoff "$@"
fi
fi
}
@ -454,7 +410,7 @@ SetEnabledUploadHosts() {
lstEnabledUploadHosts+="up_pixeldrain,up_quax,up_ranoz,up_skrepr,up_torup,up_turboonion,up_uploadee,"
lstEnabledUploadHosts+="up_uploadhive,up_uploadraja,up_herbolistique,up_uploadbay,up_ateasystems,up_syspro,"
lstEnabledUploadHosts+="up_dashfile,up_anonfile,up_fileland,up_fireget,up_euromussels,up_ramsgaard,"
lstEnabledUploadHosts+="up_gagneux,up_uwabaki"
lstEnabledUploadHosts+="up_gagneux,up_uwabaki,up_lainsafe"
elif [[ "$EnabledUploadHosts" == "online" ]] ; then
lstEnabledUploadHosts="up_1fichier,up_anonsharing,up_axfc,up_bedrive,up_bowfile,up_depotkaz,"
lstEnabledUploadHosts+="up_familleflender,up_fileblade,up_fileditch,up_firestorage,up_free4e,up_gofile,"
@ -463,7 +419,7 @@ SetEnabledUploadHosts() {
lstEnabledUploadHosts+="up_shareonline,up_skrepr,up_torup,up_turboonion,up_uploadee,up_uploadhive,"
lstEnabledUploadHosts+="up_uploadraja,up_yolobit,up_herbolistique,up_uploadbay,up_ateasystems,up_syspro,"
lstEnabledUploadHosts+="up_dashfile,up_anonfile,up_fileland,up_fireget,up_euromussels,up_ramsgaard,"
lstEnabledUploadHosts+="up_gagneux,up_uwabaki"
lstEnabledUploadHosts+="up_gagneux,up_uwabaki,up_lainsafe"
fi
}
SetEnabledDownloadHosts() {
@ -475,7 +431,7 @@ SetEnabledDownloadHosts() {
lstEnabledDownloadHosts+="moocloud,nantes,netlib,offshorecat,oshi,pixeldrain,quax,ranoz,skrepr,"
lstEnabledDownloadHosts+="tempfileme,tempsh,torup,turboonion,up2share,uploadee,uploadev,uploadhive,"
lstEnabledDownloadHosts+="youdbox,herbolistique,uploadbay,ateasystems,syspro,dashfile,anonfile,desiupload,"
lstEnabledDownloadHosts+="fileland,fireget,euromussels,ramsgaard,uwabaki,gagneux"
lstEnabledDownloadHosts+="fileland,fireget,euromussels,ramsgaard,uwabaki,gagneux,sendnow"
elif [[ "$EnabledDownloadHosts" == "online" ]] ; then
lstEnabledDownloadHosts="1fichier,anonsharing,bedrive,biteblob,bowfile,click,cyssoux,"
lstEnabledDownloadHosts+="dailyuploads,dataupload,depotkaz,dictvm,dosya,downloadgg,eddowding,eternalhosting,"
@ -485,7 +441,7 @@ SetEnabledDownloadHosts() {
lstEnabledDownloadHosts+="oshi,pixeldrain,quax,ranoz,shareonline,skrepr,tempfileme,tempsh,torup,"
lstEnabledDownloadHosts+="turboonion,up2share,uploadee,uploadev,uploadhive,yolobit,youdbox,herbolistique,"
lstEnabledDownloadHosts+="uploadbay,ateasystems,syspro,dashfile,anonfile,desiupload,fileland,fireget,"
lstEnabledDownloadHosts+="euromussels,ramsgaard,uwabaki,gagneux"
lstEnabledDownloadHosts+="euromussels,ramsgaard,uwabaki,gagneux,sendnow"
fi
}
GetRandomFiledotUser() {
@ -3303,6 +3259,13 @@ direct_FetchFileInfo() {
exitDownloadNotAvailable=true
return 1
fi
if grep -Eqi 'was removed|no such file|was deleted|not found|banned' <<< "${file_header}" ; then
printf "\\n"
echo -e "${RED}| 404. The file was not found or has been removed.${NC}"
removedDownload "${remote_url}"
exitDownloadNotAvailable=true
return 1
fi
if ! grep -Eqi 'HTTP/.*200|HTTP/.*302' <<< "${file_header}" ; then
hResponse=$(grep -oPi 'HTTP/.*? \K.*$' <<< "${file_header}")
if ((j>=maxretries)); then
@ -3433,6 +3396,15 @@ direct_GetFile() {
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