# 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

@ -1,4 +1,4 @@
DateTime: 25.02.20
DateTime: 25.02.24
Files:
./hosts/1fichier.sh
@ -11,6 +11,7 @@ Files:
./hosts/ateasystems.sh
./hosts/bedrive.sh
./hosts/biteblob.sh
./hosts/blackcloud_onion.sh
./hosts/bowfile.sh
./hosts/click.sh
./hosts/cyssoux.sh
@ -63,6 +64,7 @@ Files:
./hosts/ramsgaard.sh
./hosts/ranoz.sh
./hosts/sendnow.sh
./hosts/sendspace.sh
./hosts/shareonline.sh
./hosts/skrepr.sh
./hosts/soyjak.sh
@ -177,12 +179,11 @@ _________________________________________________________________________
./hosts/anonfile.sh:186: response=$(tor_curl_request --insecure -L -s -X POST \
./hosts/anonfile.sh:240: tor_curl_request --insecure -s "$captcha_img_url" --output "$tmp_captcha_img"
./hosts/anonfile.sh:340: response=$(tor_curl_request --insecure -L -s -X POST \
./hosts/anonfile.sh:453: file_header=$(tor_curl_request -i -s --head \
./hosts/anonfile.sh:557: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./hosts/anonfile.sh:559: tor_curl_request --insecure \
./hosts/anonfile.sh:565: tor_curl_request --insecure \
./hosts/anonfile.sh:572: tor_curl_request --insecure \
./hosts/anonfile.sh:589: tor_curl_request --insecure \
./hosts/anonfile.sh:517: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./hosts/anonfile.sh:519: tor_curl_request --insecure \
./hosts/anonfile.sh:525: tor_curl_request --insecure \
./hosts/anonfile.sh:532: tor_curl_request --insecure \
./hosts/anonfile.sh:549: tor_curl_request --insecure \
./hosts/anonsharing.sh:91: response=$(tor_curl_request --insecure -i -s \
./hosts/anonsharing.sh:150: file_header=$(tor_curl_request --insecure --head -L -i -s \
./hosts/anonsharing.sh:158: file_header=$(tor_curl_request --insecure --head -H "Connection: keep-alive" -s -i \
@ -204,8 +205,8 @@ _________________________________________________________________________
./hosts/biteblob.sh:96: response=$(tor_curl_request --insecure -L -s "${fixed_url}")
./hosts/biteblob.sh:144: file_header=$(tor_curl_request --insecure --head -L -s "$download_url")
./hosts/biteblob.sh:227: tor_curl_request --insecure --referer "$file_url" "$download_url" --output "$file_path"
./hosts/biteblob.sh:271: tor_curl_request --insecure --speed-limit $DownloadSpeedMin --speed-time $DownloadTimeoutInterval "$download_url" --continue-at - --output "$file_path"
./hosts/biteblob.sh:273: tor_curl_request --insecure --referer "$file_url" "$download_url" --continue-at - --output "$file_path"
./hosts/biteblob.sh:284: tor_curl_request --insecure --speed-limit $DownloadSpeedMin --speed-time $DownloadTimeoutInterval "$download_url" --continue-at - --output "$file_path"
./hosts/biteblob.sh:286: tor_curl_request --insecure --referer "$file_url" "$download_url" --continue-at - --output "$file_path"
./hosts/bowfile.sh:91: response=$(tor_curl_request --insecure -L -s -b "${bow_cookie_jar}" -c "${bow_cookie_jar}" \
./hosts/bowfile.sh:143: response=$(tor_curl_request --insecure -s --head \
./hosts/bowfile.sh:182: file_header=$(tor_curl_request --insecure -L -sS -i --head \
@ -326,8 +327,8 @@ _________________________________________________________________________
./hosts/isupload.sh:251: file_header=$(tor_curl_request --insecure --head -H "Connection: keep-alive" -L -s -i "$download_url" |
./hosts/isupload.sh:263: file_header=$(tor_curl_request_extended --insecure --head -L -s "$download_url")
./hosts/isupload.sh:355: tor_curl_request_extended --insecure -L "$download_url" --output "$file_path"
./hosts/isupload.sh:399: tor_curl_request_extended --insecure -L --speed-limit $DownloadSpeedMin --speed-time $DownloadTimeoutInterval "$download_url" --continue-at - --output "$file_path"
./hosts/isupload.sh:401: tor_curl_request_extended --insecure -L "$download_url" --continue-at - --output "$file_path"
./hosts/isupload.sh:403: tor_curl_request_extended --insecure -L --speed-limit $DownloadSpeedMin --speed-time $DownloadTimeoutInterval "$download_url" --continue-at - --output "$file_path"
./hosts/isupload.sh:405: tor_curl_request_extended --insecure -L "$download_url" --continue-at - --output "$file_path"
./hosts/kraken.sh:104: PAGE=$(tor_curl_request --insecure --max-time "$ConnectTimeout" -s -L -c "${kraken_cookie_jar}" "${fixed_url}")
./hosts/kraken.sh:169: down_request=$(tor_curl_request --insecure -L -s -b "${kraken_cookie_jar}" -c "${kraken_cookie_jar}" -F "token=${kraken_token}" "${kraken_action}")
./hosts/kraken.sh:186: file_header=$(tor_curl_request --insecure --head -L -s -b "${kraken_cookie_jar}" -c "${kraken_cookie_jar}" --referer "$kraken_action" "$download_url")
@ -341,16 +342,16 @@ _________________________________________________________________________
./hosts/nippy.sh:188: file_header=$(tor_curl_request --insecure -L --head -s \
./hosts/nippy.sh:299: tor_curl_request --insecure -L --speed-limit $DownloadSpeedMin --speed-time $DownloadTimeoutInterval \
./hosts/nippy.sh:302: tor_curl_request --insecure -L "$download_url" --continue-at - --output "$file_path"
./hosts/oshi.sh:108: file_header=$(tor_curl_request --insecure --head -L -s --referer "$remote_url" "$download_url")
./hosts/oshi.sh:202: tor_curl_request --insecure --speed-limit $DownloadSpeedMin --speed-time $DownloadTimeoutInterval --referer "$file_url" "$download_url" --continue-at - --output "$file_path"
./hosts/oshi.sh:204: tor_curl_request --insecure --referer "$file_url" "$download_url" --continue-at - --output "$file_path"
./hosts/oshi.sh:107: file_header=$(tor_curl_request --insecure --head -L -s --referer "$remote_url" "$download_url")
./hosts/oshi.sh:201: tor_curl_request --insecure -L --speed-limit $DownloadSpeedMin --speed-time $DownloadTimeoutInterval --referer "$file_url" "$download_url" --continue-at - --output "$file_path"
./hosts/oshi.sh:203: tor_curl_request --insecure -L --referer "$file_url" "$download_url" --continue-at - --output "$file_path"
./hosts/pixeldrain.sh:94: response=$(tor_curl_request --insecure -L -s "https://pixeldrain.com/u/$fileid")
./hosts/pixeldrain.sh:256: file_header=$(tor_curl_request --insecure --head -L -s --referer "$file_url" "$pdheadurl")
./hosts/pixeldrain.sh:322: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./hosts/pixeldrain.sh:324: tor_curl_request --insecure \
./hosts/pixeldrain.sh:328: tor_curl_request --insecure \
./hosts/pixeldrain.sh:333: tor_curl_request --insecure \
./hosts/pixeldrain.sh:342: tor_curl_request --insecure \
./hosts/pixeldrain.sh:259: file_header=$(tor_curl_request --insecure --head -L -s --referer "$file_url" "$pdheadurl")
./hosts/pixeldrain.sh:325: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./hosts/pixeldrain.sh:327: tor_curl_request --insecure \
./hosts/pixeldrain.sh:331: tor_curl_request --insecure \
./hosts/pixeldrain.sh:336: tor_curl_request --insecure \
./hosts/pixeldrain.sh:345: tor_curl_request --insecure \
./hosts/quax.sh:85: file_header=$(tor_curl_request --insecure --head -L -s "$download_url")
./hosts/quax.sh:176: tor_curl_request --insecure --speed-limit $DownloadSpeedMin --speed-time $DownloadTimeoutInterval "$download_url" --continue-at - --output "$file_path"
./hosts/quax.sh:178: tor_curl_request --insecure "$download_url" --continue-at - --output "$file_path"
@ -361,14 +362,21 @@ _________________________________________________________________________
./hosts/ranoz.sh:276: tor_curl_request --insecure -L -G --no-alpn \
./hosts/ranoz.sh:281: tor_curl_request --insecure -L -G --no-alpn \
./hosts/ranoz.sh:296: tor_curl_request --insecure -L -G --no-alpn \
./hosts/sendnow.sh:90: response=$(tor_curl_request --insecure -L -s -b "${snow_cookie_jar}" -c "${snow_cookie_jar}" "$remote_url")
./hosts/sendnow.sh:160: response=$(tor_curl_request --insecure -L -svo. -X POST \
./hosts/sendnow.sh:204: file_header=$(tor_curl_request_extended --insecure --head -Lis \
./hosts/sendnow.sh:325: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./hosts/sendnow.sh:327: tor_curl_request_extended --insecure -L --no-alpn \
./hosts/sendnow.sh:345: tor_curl_request --insecure -L --no-alpn \
./hosts/sendnow.sh:364: tor_curl_request --insecure -L --no-alpn \
./hosts/sendnow.sh:383: tor_curl_request --insecure -L --no-alpn \
./hosts/sendnow.sh:89: response=$(tor_curl_request --insecure -L -s -b "${snow_cookie_jar}" -c "${snow_cookie_jar}" "$remote_url")
./hosts/sendnow.sh:162: response=$(tor_curl_request --insecure -L -svo. -X POST \
./hosts/sendnow.sh:206: file_header=$(tor_curl_request_extended --insecure --head -Lis \
./hosts/sendnow.sh:327: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./hosts/sendnow.sh:329: tor_curl_request_extended --insecure -L --no-alpn \
./hosts/sendnow.sh:347: tor_curl_request --insecure -L --no-alpn \
./hosts/sendnow.sh:366: tor_curl_request --insecure -L --no-alpn \
./hosts/sendnow.sh:385: tor_curl_request --insecure -L --no-alpn \
./hosts/sendspace.sh:90: response=$(tor_curl_request --insecure -L -s -b "${ss_cookie_jar}" -c "${ss_cookie_jar}" "$remote_url")
./hosts/sendspace.sh:157: file_header=$(tor_curl_request --insecure -L --head -s \
./hosts/sendspace.sh:273: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./hosts/sendspace.sh:275: tor_curl_request --insecure --speed-limit $DownloadSpeedMin --speed-time $DownloadTimeoutInterval "$download_url" --continue-at - --output "$file_path"
./hosts/sendspace.sh:277: tor_curl_request --insecure "$download_url" --continue-at - --output "$file_path"
./hosts/sendspace.sh:281: tor_curl_request --insecure --speed-limit $DownloadSpeedMin --speed-time $DownloadTimeoutInterval \
./hosts/sendspace.sh:296: tor_curl_request --insecure \
./hosts/syspro.sh:88: response=$(tor_curl_request --insecure -L -s "$remote_url")
./hosts/syspro.sh:186: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./hosts/syspro.sh:188: tor_curl_request --insecure -L \
@ -487,119 +495,119 @@ _________________________________________________________________________
./hosts/youdbox.sh:183: file_header=$(tor_curl_request --insecure -L --head -s --referer "${fixed_url}" "$download_url")
./hosts/youdbox.sh:276: tor_curl_request --insecure -L -G --speed-limit $DownloadSpeedMin --speed-time $DownloadTimeoutInterval "$download_url" --continue-at - --output "$file_path"
./hosts/youdbox.sh:278: tor_curl_request --insecure -L -G "$download_url" --continue-at - --output "$file_path"
./mad.sh:98:UseTorCurlImpersonate=false
./mad.sh:394:tor_curl_request() {
./mad.sh:395: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./mad.sh:396: "${curl_impersonate[@]}" --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeout} --compressed --globoff "$@"
./mad.sh:398: curl --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeout} --compressed --globoff "$@"
./mad.sh:401:tor_curl_request_extended() {
./mad.sh:91:UseTorCurlImpersonate=false
./mad.sh:387:tor_curl_request() {
./mad.sh:388: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./mad.sh:389: "${curl_impersonate[@]}" --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeout} --compressed --globoff "$@"
./mad.sh:391: curl --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeout} --compressed --globoff "$@"
./mad.sh:394:tor_curl_request_extended() {
./mad.sh:396: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./mad.sh:397: "${curl_impersonate[@]}" --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout $randomtimeout --compressed --globoff "$@"
./mad.sh:399: curl --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout $randomtimeout --compressed --globoff "$@"
./mad.sh:402:tor_curl_upload() {
./mad.sh:403: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./mad.sh:404: "${curl_impersonate[@]}" --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout $randomtimeout --compressed --globoff "$@"
./mad.sh:406: curl --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout $randomtimeout --compressed --globoff "$@"
./mad.sh:409:tor_curl_upload() {
./mad.sh:410: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./mad.sh:412: "${curl_impersonate[@]}" --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeoutUpload} --speed-limit $UploadSpeedMin --speed-time $UploadTimeoutInterval --compressed --globoff "$@"
./mad.sh:414: "${curl_impersonate[@]}" --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeoutUpload} --compressed --globoff "$@"
./mad.sh:418: 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 "$@"
./mad.sh:420: 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 "$@"
./mad.sh:1421:install_curl_impersonate() {
./mad.sh:1423: echo -e "${BLUE}lwthiker curl_impersonate${NC} is the original dev, but it is relatively inactive."
./mad.sh:1424: echo -e "- Currently uses curl v8.1.1."
./mad.sh:1428: echo -e "${BLUE}lexiforest curl_impersonate${NC} is an active fork of curl_impersonate."
./mad.sh:1429: echo -e "+ Currently uses curl v8.7.1"
./mad.sh:1433: PS3='Please select which curl_impersonate to install: '
./mad.sh:1441: install_curl_impersonate_lwthiker_orig
./mad.sh:1445: install_curl_impersonate_lexiforest_fork
./mad.sh:1455:install_curl_impersonate_lwthiker_orig() {
./mad.sh:1459: echo -e "${BLUE}lwthiker curl_impersonate${NC} is the original curl_impersonate."
./mad.sh:1460: echo -e "+ Currently uses curl v8.1.1, and has low activity for updates"
./mad.sh:1463: echo -e "${GREEN}| Fetching:${NC} latest ${BLUE}lwthiker curl_impersonate${NC} info from github...${NC}"
./mad.sh:1466: response=$(tor_curl_request --insecure -L -s https://github.com/lwthiker/curl-impersonate/releases/latest)
./mad.sh:1468: debugHtml "github" "lbf_inst_curlimp$j" "$response"
./mad.sh:1471: latestTag=$(grep -oPi -m 1 '(?<=/curl-impersonate/releases/tag/).*?(?=")' <<< "$response")
./mad.sh:1481: yes_or_no "Do you wish to download and extract curl_impersonate $latestTag (using tor+curl)?" && {
./mad.sh:1483: download_url='https://github.com/lwthiker/curl-impersonate/releases/download/'"$latestTag"'/curl-impersonate-'"$latestTag"'.x86_64-linux-gnu.tar.gz'
./mad.sh:1486: file_header=$(tor_curl_request --insecure --head -Ls "$download_url")
./mad.sh:1488: debugHtml "github" "head_inst_curlimp$j" "${file_header}"
./mad.sh:1536: tor_curl_request --insecure -L "$download_url" --continue-at - --output "$file_path"
./mad.sh:1565: echo -e "| Extracting curl_impersonate..."
./mad.sh:1567: rm -f "${ScriptDir}"/curl*
./mad.sh:1568: mv "$extract_location/curl-impersonate-ff" "${ScriptDir}/"
./mad.sh:1569: mv "$extract_location/curl_ff109" "${ScriptDir}/"
./mad.sh:1570: echo -e "${GREEN}| Done.${NC} Update ${BLUE}\"UseTorCurlImpersonate=true\"${NC} in script to use..."
./mad.sh:1578:install_curl_impersonate_lexiforest_fork() {
./mad.sh:1582: echo -e "${BLUE}lexiforest curl_impersonate${NC} is an active fork of curl_impersonate."
./mad.sh:1583: echo -e "+ Currently uses curl v8.7.1, and is patched for latest CVEs"
./mad.sh:1586: echo -e "${GREEN}| Fetching:${NC} latest ${BLUE}lexiforest curl_impersonate fork${NC} info from github...${NC}"
./mad.sh:1589: response=$(tor_curl_request --insecure -L -s https://github.com/lexiforest/curl-impersonate/releases/latest)
./mad.sh:1591: debugHtml "github" "lbf_inst_curlimp$j" "$response"
./mad.sh:1594: latestTag=$(grep -oPi -m 1 '(?<=/curl-impersonate/releases/tag/).*?(?=")' <<< "$response")
./mad.sh:1604: yes_or_no "Do you wish to download and extract curl_impersonate $latestTag (using tor+curl)?" && {
./mad.sh:1606: download_url='https://github.com/lexiforest/curl-impersonate/releases/download/'"$latestTag"'/curl-impersonate-'"$latestTag"'.x86_64-linux-gnu.tar.gz'
./mad.sh:1609: file_header=$(tor_curl_request --insecure --head -Ls "$download_url")
./mad.sh:1611: debugHtml "github" "head_inst_curlimp$j" "${file_header}"
./mad.sh:1659: tor_curl_request --insecure -L "$download_url" --continue-at - --output "$file_path"
./mad.sh:1688: echo -e "| Extracting curl_impersonate..."
./mad.sh:1690: rm -f "${ScriptDir}"/curl*
./mad.sh:1691: mv "$extract_location/curl-impersonate-chrome" "${ScriptDir}/"
./mad.sh:1692: mv "$extract_location/curl_chrome131" "${ScriptDir}/"
./mad.sh:1693: echo -e "${GREEN}| Done.${NC} Update ${BLUE}\"UseTorCurlImpersonate=true\"${NC} in script to use..."
./mad.sh:1855: echo -e ":${NC} ${GREEN}MAD${PINK} Audit${NC} : Reports usage of http & curl in scripts${PINK}${BLD} :"
./mad.sh:1863: maud_curl=$(grep -n -vxE '[[:blank:]]*([#].*)?' $fil | grep --color='always' -Ei 'curl')
./mad.sh:1864: maud_torcurl=$(grep -n -vxE '[[:blank:]]*([#].*)?' $fil | grep -A 12 --color='always' -Ei 'tor_curl')
./mad.sh:1873: echo -e "${PINK}MAD Audit of curl:${NC} (${GREEN}grep \"curl\"${NC})"
./mad.sh:1875: echo -e "$maud_curl"
./mad.sh:1877: echo -e "${PINK}MAD Audit of tor_curl (+12 lines after):${NC} (${GREEN}grep \"tor_curl\"${NC})"
./mad.sh:1879: echo -e "$maud_torcurl"
./mad.sh:1891: maud_curl=$(grep -n -vxE '[[:blank:]]*([#].*)?' $fil | grep --color='always' -Ei 'curl')
./mad.sh:1892: maud_torcurl=$(grep -n -vxE '[[:blank:]]*([#].*)?' $fil | grep -A 12 --color='always' -Ei 'tor_curl')
./mad.sh:1901: echo -e "${PINK}MAD Audit of curl:${NC} (${GREEN}grep \"curl \"${NC})"
./mad.sh:1903: echo -e "$maud_curl"
./mad.sh:1905: echo -e "${PINK}MAD Audit of tor_curl (+12 lines after):${NC} (${GREEN}grep \"tor_curl\"${NC})"
./mad.sh:1907: echo -e "$maud_torcurl"
./mad.sh:1913: maud_curl=$(grep -n -vxE '[[:blank:]]*([#].*)?' $fil | grep --color='always' -Ei 'curl')
./mad.sh:1914: maud_torcurl=$(grep -n -vxE '[[:blank:]]*([#].*)?' $fil | grep -A 12 --color='always' -Ei 'tor_curl')
./mad.sh:1923: echo -e "${PINK}MAD Audit of curl:${NC} (${GREEN}grep \"curl\"${NC})"
./mad.sh:1925: echo -e "$maud_curl"
./mad.sh:1927: echo -e "${PINK}MAD Audit of tor_curl (+12 lines after):${NC} (${GREEN}grep \"tor_curl\"${NC})"
./mad.sh:1929: echo -e "$maud_torcurl"
./mad.sh:2876: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./mad.sh:2877: printf "client: ${GREEN}Tor${NC} + ${BLUE}curl_impersonate${NC}\\n"
./mad.sh:2879: printf "client: ${GREEN}Tor${NC} + ${GREEN}curl${NC}\\n"
./mad.sh:3051: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./mad.sh:3052: printf "client: ${GREEN}Tor${NC} + ${BLUE}curl_impersonate${NC}\\n"
./mad.sh:3054: printf "client: ${GREEN}Tor${NC} + ${GREEN}curl${NC}\\n"
./mad.sh:3252: file_header=$(tor_curl_request --insecure -m 8 -s -D - -o /dev/null \
./mad.sh:3259: file_header=$(tor_curl_request --insecure --head -H "Connection: keep-alive" -L -s -i "$download_url" |
./mad.sh:3396: tor_curl_request --insecure -L --referer "$file_url" "$download_url" --output "$file_path"
./mad.sh:3449: tor_curl_request --insecure -L --speed-limit $DownloadSpeedMin --speed-time $DownloadTimeoutInterval "$download_url" --continue-at - --output "$file_path"
./mad.sh:3451: tor_curl_request --insecure -L --referer "$file_url" "$download_url" --continue-at - --output "$file_path"
./mad.sh:3649: response=$(tor_curl_upload --insecure -i \
./mad.sh:3656: response=$(tor_curl_upload --insecure -i \
./mad.sh:3727:if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./mad.sh:3728: curl_impersonate=()
./mad.sh:3729: readarray -d $'' arrFiles < <(find "$ScriptDir" -maxdepth 1 -name "curl_*" -printf '%p\n' | sort -Vk1)
./mad.sh:3730: bFoundCurlHeader=false
./mad.sh:3734: curl_impersonate=($fil)
./mad.sh:3735: bFoundCurlHeader=true
./mad.sh:3739: if [[ "$bFoundCurlHeader" == "false" ]]; then
./mad.sh:3740: echo -e "${RED}[ERROR] Missing dependency \"curl-impersonate\"!${NC}"
./mad.sh:3743: echo -e "You'll need to download ${GREEN}\"curl-impersonate\"${NC}."
./mad.sh:3746: echo -e "The latest binary can be obtained on GitHub, search for \"curl-impersonate\""
./mad.sh:3748: echo -e " 1. Visit the page of curl-impersonate and add \"/releases/latest/\" at end of URL."
./mad.sh:3752: echo -e " 4. Download archive ${GREEN}\"curl-impersonate-vX.Y.Z.x86_64-linux-gnu.tar.gz\"${YELLOW}."
./mad.sh:3753: echo -e " 5. Extract files ${GREEN}\"curl-impersonate-ff\"${NC} and ${GREEN}\"curl_ff109\"${NC} next to this script."
./mad.sh:3756: echo -e "run $0 install_curl_impersonate\\n"
./mad.sh:3758: yes_or_no "Do you wish to download and extract latest curl_impersonate (using tor+curl)?" && {
./mad.sh:3759: UseTorCurlImpersonate=false
./mad.sh:3760: install_curl_impersonate
./mad.sh:3844: echo -e "[${YELLOW}Install curl_impersonate${NC}]: Downloads the latest binary for curl_impersonate from github repo (3 choices)"
./mad.sh:3845: printf " %s install_curl_impersonate\\n" "$0"
./mad.sh:3923:elif [[ "$arg1" == "install_curl_impersonate" ]]; then
./mad.sh:3924: install_curl_impersonate
./mad.sh:3955:if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./mad.sh:3956: printf "client: ${GREEN}Tor${NC} + ${BLUE}curl_impersonate${NC}\\n"
./mad.sh:3958: printf "client: ${GREEN}Tor${NC} + ${GREEN}curl${NC}\\n"
./mad.sh:405: "${curl_impersonate[@]}" --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeoutUpload} --speed-limit $UploadSpeedMin --speed-time $UploadTimeoutInterval --compressed --globoff "$@"
./mad.sh:407: "${curl_impersonate[@]}" --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeoutUpload} --compressed --globoff "$@"
./mad.sh:411: 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 "$@"
./mad.sh:413: 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 "$@"
./mad.sh:1415:install_curl_impersonate() {
./mad.sh:1417: echo -e "${BLUE}lwthiker curl_impersonate${NC} is the original dev, but it is relatively inactive."
./mad.sh:1418: echo -e "- Currently uses curl v8.1.1."
./mad.sh:1422: echo -e "${BLUE}lexiforest curl_impersonate${NC} is an active fork of curl_impersonate."
./mad.sh:1423: echo -e "+ Currently uses curl v8.7.1"
./mad.sh:1427: PS3='Please select which curl_impersonate to install: '
./mad.sh:1435: install_curl_impersonate_lwthiker_orig
./mad.sh:1439: install_curl_impersonate_lexiforest_fork
./mad.sh:1449:install_curl_impersonate_lwthiker_orig() {
./mad.sh:1453: echo -e "${BLUE}lwthiker curl_impersonate${NC} is the original curl_impersonate."
./mad.sh:1454: echo -e "+ Currently uses curl v8.1.1, and has low activity for updates"
./mad.sh:1457: echo -e "${GREEN}| Fetching:${NC} latest ${BLUE}lwthiker curl_impersonate${NC} info from github...${NC}"
./mad.sh:1460: response=$(tor_curl_request --insecure -L -s https://github.com/lwthiker/curl-impersonate/releases/latest)
./mad.sh:1462: debugHtml "github" "lbf_inst_curlimp$j" "$response"
./mad.sh:1465: latestTag=$(grep -oPi -m 1 '(?<=/curl-impersonate/releases/tag/).*?(?=")' <<< "$response")
./mad.sh:1475: yes_or_no "Do you wish to download and extract curl_impersonate $latestTag (using tor+curl)?" && {
./mad.sh:1477: download_url='https://github.com/lwthiker/curl-impersonate/releases/download/'"$latestTag"'/curl-impersonate-'"$latestTag"'.x86_64-linux-gnu.tar.gz'
./mad.sh:1480: file_header=$(tor_curl_request --insecure --head -Ls "$download_url")
./mad.sh:1482: debugHtml "github" "head_inst_curlimp$j" "${file_header}"
./mad.sh:1530: tor_curl_request --insecure -L "$download_url" --continue-at - --output "$file_path"
./mad.sh:1559: echo -e "| Extracting curl_impersonate..."
./mad.sh:1561: rm -f "${ScriptDir}"/curl*
./mad.sh:1562: mv "$extract_location/curl-impersonate-ff" "${ScriptDir}/"
./mad.sh:1563: mv "$extract_location/curl_ff109" "${ScriptDir}/"
./mad.sh:1564: echo -e "${GREEN}| Done.${NC} Update ${BLUE}\"UseTorCurlImpersonate=true\"${NC} in script to use..."
./mad.sh:1572:install_curl_impersonate_lexiforest_fork() {
./mad.sh:1576: echo -e "${BLUE}lexiforest curl_impersonate${NC} is an active fork of curl_impersonate."
./mad.sh:1577: echo -e "+ Currently uses curl v8.7.1, and is patched for latest CVEs"
./mad.sh:1580: echo -e "${GREEN}| Fetching:${NC} latest ${BLUE}lexiforest curl_impersonate fork${NC} info from github...${NC}"
./mad.sh:1583: response=$(tor_curl_request --insecure -L -s https://github.com/lexiforest/curl-impersonate/releases/latest)
./mad.sh:1585: debugHtml "github" "lbf_inst_curlimp$j" "$response"
./mad.sh:1588: latestTag=$(grep -oPi -m 1 '(?<=/curl-impersonate/releases/tag/).*?(?=")' <<< "$response")
./mad.sh:1598: yes_or_no "Do you wish to download and extract curl_impersonate $latestTag (using tor+curl)?" && {
./mad.sh:1600: download_url='https://github.com/lexiforest/curl-impersonate/releases/download/'"$latestTag"'/curl-impersonate-'"$latestTag"'.x86_64-linux-gnu.tar.gz'
./mad.sh:1603: file_header=$(tor_curl_request --insecure --head -Ls "$download_url")
./mad.sh:1605: debugHtml "github" "head_inst_curlimp$j" "${file_header}"
./mad.sh:1653: tor_curl_request --insecure -L "$download_url" --continue-at - --output "$file_path"
./mad.sh:1682: echo -e "| Extracting curl_impersonate..."
./mad.sh:1684: rm -f "${ScriptDir}"/curl*
./mad.sh:1685: mv "$extract_location/curl-impersonate-chrome" "${ScriptDir}/"
./mad.sh:1686: mv "$extract_location/curl_chrome131" "${ScriptDir}/"
./mad.sh:1687: echo -e "${GREEN}| Done.${NC} Update ${BLUE}\"UseTorCurlImpersonate=true\"${NC} in script to use..."
./mad.sh:1849: echo -e ":${NC} ${GREEN}MAD${PINK} Audit${NC} : Reports usage of http & curl in scripts${PINK}${BLD} :"
./mad.sh:1857: maud_curl=$(grep -n -vxE '[[:blank:]]*([#].*)?' $fil | grep --color='always' -Ei 'curl')
./mad.sh:1858: maud_torcurl=$(grep -n -vxE '[[:blank:]]*([#].*)?' $fil | grep -A 12 --color='always' -Ei 'tor_curl')
./mad.sh:1867: echo -e "${PINK}MAD Audit of curl:${NC} (${GREEN}grep \"curl\"${NC})"
./mad.sh:1869: echo -e "$maud_curl"
./mad.sh:1871: echo -e "${PINK}MAD Audit of tor_curl (+12 lines after):${NC} (${GREEN}grep \"tor_curl\"${NC})"
./mad.sh:1873: echo -e "$maud_torcurl"
./mad.sh:1885: maud_curl=$(grep -n -vxE '[[:blank:]]*([#].*)?' $fil | grep --color='always' -Ei 'curl')
./mad.sh:1886: maud_torcurl=$(grep -n -vxE '[[:blank:]]*([#].*)?' $fil | grep -A 12 --color='always' -Ei 'tor_curl')
./mad.sh:1895: echo -e "${PINK}MAD Audit of curl:${NC} (${GREEN}grep \"curl \"${NC})"
./mad.sh:1897: echo -e "$maud_curl"
./mad.sh:1899: echo -e "${PINK}MAD Audit of tor_curl (+12 lines after):${NC} (${GREEN}grep \"tor_curl\"${NC})"
./mad.sh:1901: echo -e "$maud_torcurl"
./mad.sh:1907: maud_curl=$(grep -n -vxE '[[:blank:]]*([#].*)?' $fil | grep --color='always' -Ei 'curl')
./mad.sh:1908: maud_torcurl=$(grep -n -vxE '[[:blank:]]*([#].*)?' $fil | grep -A 12 --color='always' -Ei 'tor_curl')
./mad.sh:1917: echo -e "${PINK}MAD Audit of curl:${NC} (${GREEN}grep \"curl\"${NC})"
./mad.sh:1919: echo -e "$maud_curl"
./mad.sh:1921: echo -e "${PINK}MAD Audit of tor_curl (+12 lines after):${NC} (${GREEN}grep \"tor_curl\"${NC})"
./mad.sh:1923: echo -e "$maud_torcurl"
./mad.sh:2878: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./mad.sh:2879: printf "client: ${GREEN}Tor${NC} + ${BLUE}curl_impersonate${NC}\\n"
./mad.sh:2881: printf "client: ${GREEN}Tor${NC} + ${GREEN}curl${NC}\\n"
./mad.sh:3053: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./mad.sh:3054: printf "client: ${GREEN}Tor${NC} + ${BLUE}curl_impersonate${NC}\\n"
./mad.sh:3056: printf "client: ${GREEN}Tor${NC} + ${GREEN}curl${NC}\\n"
./mad.sh:3254: file_header=$(tor_curl_request --insecure -m 8 -s -D - -o /dev/null \
./mad.sh:3261: file_header=$(tor_curl_request --insecure --head -H "Connection: keep-alive" -L -s -i "$download_url" |
./mad.sh:3398: tor_curl_request --insecure -L --referer "$file_url" "$download_url" --output "$file_path"
./mad.sh:3455: tor_curl_request --insecure -L --speed-limit $DownloadSpeedMin --speed-time $DownloadTimeoutInterval "$download_url" --continue-at - --output "$file_path"
./mad.sh:3457: tor_curl_request --insecure -L --referer "$file_url" "$download_url" --continue-at - --output "$file_path"
./mad.sh:3655: response=$(tor_curl_upload --insecure -i \
./mad.sh:3662: response=$(tor_curl_upload --insecure -i \
./mad.sh:3733:if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./mad.sh:3734: curl_impersonate=()
./mad.sh:3735: readarray -d $'' arrFiles < <(find "$ScriptDir" -maxdepth 1 -name "curl_*" -printf '%p\n' | sort -Vk1)
./mad.sh:3736: bFoundCurlHeader=false
./mad.sh:3740: curl_impersonate=($fil)
./mad.sh:3741: bFoundCurlHeader=true
./mad.sh:3745: if [[ "$bFoundCurlHeader" == "false" ]]; then
./mad.sh:3746: echo -e "${RED}[ERROR] Missing dependency \"curl-impersonate\"!${NC}"
./mad.sh:3749: echo -e "You'll need to download ${GREEN}\"curl-impersonate\"${NC}."
./mad.sh:3752: echo -e "The latest binary can be obtained on GitHub, search for \"curl-impersonate\""
./mad.sh:3754: echo -e " 1. Visit the page of curl-impersonate and add \"/releases/latest/\" at end of URL."
./mad.sh:3758: echo -e " 4. Download archive ${GREEN}\"curl-impersonate-vX.Y.Z.x86_64-linux-gnu.tar.gz\"${YELLOW}."
./mad.sh:3759: echo -e " 5. Extract files ${GREEN}\"curl-impersonate-ff\"${NC} and ${GREEN}\"curl_ff109\"${NC} next to this script."
./mad.sh:3762: echo -e "run $0 install_curl_impersonate\\n"
./mad.sh:3764: yes_or_no "Do you wish to download and extract latest curl_impersonate (using tor+curl)?" && {
./mad.sh:3765: UseTorCurlImpersonate=false
./mad.sh:3766: install_curl_impersonate
./mad.sh:3850: echo -e "[${YELLOW}Install curl_impersonate${NC}]: Downloads the latest binary for curl_impersonate from github repo (3 choices)"
./mad.sh:3851: printf " %s install_curl_impersonate\\n" "$0"
./mad.sh:3929:elif [[ "$arg1" == "install_curl_impersonate" ]]; then
./mad.sh:3930: install_curl_impersonate
./mad.sh:3961:if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./mad.sh:3962: printf "client: ${GREEN}Tor${NC} + ${BLUE}curl_impersonate${NC}\\n"
./mad.sh:3964: printf "client: ${GREEN}Tor${NC} + ${GREEN}curl${NC}\\n"
./plugins/pjscloud.sh:44: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
./plugins/pjscloud.sh:45: response=$("${curl_impersonate[@]}" --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" \
./plugins/pjscloud.sh:53: response=$(curl --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" \

View file

@ -1,4 +1,4 @@
DateTime: 25.02.20
DateTime: 25.02.24
Files:
./hosts/1fichier.sh
@ -11,6 +11,7 @@ Files:
./hosts/ateasystems.sh
./hosts/bedrive.sh
./hosts/biteblob.sh
./hosts/blackcloud_onion.sh
./hosts/bowfile.sh
./hosts/click.sh
./hosts/cyssoux.sh
@ -63,6 +64,7 @@ Files:
./hosts/ramsgaard.sh
./hosts/ranoz.sh
./hosts/sendnow.sh
./hosts/sendspace.sh
./hosts/shareonline.sh
./hosts/skrepr.sh
./hosts/soyjak.sh
@ -163,8 +165,8 @@ _________________________________________________________________________
./hosts/1fichier.sh:166: if ! grep -Eqi "https://" <<< "${target_file_link}" > /dev/null ; then
./hosts/9saves.sh:141: --data "$form_data" "https://9saves.com/")
./hosts/anonfile.sh:230: if grep -Eqi 'img src="https://anonfile.de/captchas/' <<< "$response" ; then
./hosts/anonfile.sh:414: if grep -Eqi '<a class="stretched-link" href="https://anonfile.de' <<< "$response"; then
./hosts/anonfile.sh:554: anon_host=$(grep -oPi '(?<=https://).*(?=/)' <<< "$fixed_url")
./hosts/anonfile.sh:442: if grep -Eqi '<a class="stretched-link" href="https:' <<< "$response"; then
./hosts/anonfile.sh:514: anon_host=$(grep -oPi '(?<=https://).*(?=/)' <<< "$fixed_url")
./hosts/anonsharing.sh:95: "https://anonsharing.com/account/ajax/file_details")
./hosts/anonsharing.sh:121: if grep -Eqi 'openUrl\('"'"'https:\\/\\/anonsharing.com\\/' <<< "$response"; then
./hosts/anonsharing.sh:124: download_url='https://anonsharing.com/'$(grep -oPi '(?<=openUrl\('"'"'https:\\/\\/anonsharing.com\\/).*?(?='"'"'.*$)' <<< "$response" | head -1)
@ -226,19 +228,20 @@ _________________________________________________________________________
./hosts/kraken.sh:155: kraken_action="https://krakenfiles.com/download/${kraken_action##*/}"
./hosts/nippy.sh:160: download_url="https:"$(grep -oP '(?<=<h2><a href='\'').*(?='\'' class=)' <<< "$response")
./hosts/nippy.sh:229: cdn_url="https:"$(grep -oP '(?<=location: ).*$' <<< "$file_header")
./hosts/oshi.sh:104: download_url=${download_url//https:/http:}
./hosts/oshi.sh:103: download_url=${download_url//https:/http:}
./hosts/pixeldrain.sh:94: response=$(tor_curl_request --insecure -L -s "https://pixeldrain.com/u/$fileid")
./hosts/pixeldrain.sh:159: resp_pump=$(pjscloud_tor_request "https://pixeldrain.com/u/$fileid")
./hosts/pixeldrain.sh:250: pdheadurl="https://pixeldrain.com/api/file/${fileid}"
./hosts/pixeldrain.sh:252: pdheadurl="https://pd.cybar.xyz/$fileid"
./hosts/pixeldrain.sh:272: download_url="https://pixeldrain.com/api/file/${fileid}"
./hosts/sendnow.sh:182: if grep -Eqi 'location: https://' <<< "$response"; then
./hosts/sendnow.sh:198: fshost=$(grep -oPi -m 1 '(?<=https://).*?(?=/d/)' <<< "$download_url")
./hosts/sendnow.sh:209: -H "Referer: https://send.now/" \
./hosts/sendnow.sh:333: -H "Referer: https://send.now/" \
./hosts/sendnow.sh:350: -H "Referer: https://send.now/" \
./hosts/sendnow.sh:371: -H "Referer: https://send.now/" \
./hosts/sendnow.sh:389: -H "Referer: https://send.now/" \
./hosts/pixeldrain.sh:253: pdheadurl="https://pixeldrain.com/api/file/${fileid}"
./hosts/pixeldrain.sh:255: pdheadurl="https://pd.cybar.xyz/$fileid"
./hosts/pixeldrain.sh:275: download_url="https://pixeldrain.com/api/file/${fileid}"
./hosts/sendnow.sh:184: if grep -Eqi 'location: https://' <<< "$response"; then
./hosts/sendnow.sh:200: fshost=$(grep -oPi -m 1 '(?<=https://).*?(?=/d/)' <<< "$download_url")
./hosts/sendnow.sh:211: -H "Referer: https://send.now/" \
./hosts/sendnow.sh:335: -H "Referer: https://send.now/" \
./hosts/sendnow.sh:352: -H "Referer: https://send.now/" \
./hosts/sendnow.sh:373: -H "Referer: https://send.now/" \
./hosts/sendnow.sh:391: -H "Referer: https://send.now/" \
./hosts/sendspace.sh:130: if grep -Eqi 'class="download_page_button button1" href="https://' <<< "$response"; then
./hosts/tempfileme.sh:144: if grep -Eqi 'id="download-button" href="http://tempfile.me/file/' <<< "$response"; then
./hosts/tempfileme.sh:146: download_url="${download_url/http:/https:}"
./hosts/tempfileme.sh:186: if grep -Eqi 'location: https://' <<< "${file_header}" ; then
@ -397,7 +400,7 @@ _________________________________________________________________________
./hosts/up_offshorecat.sh:112: if grep -Eqi '"url":"https://files.offshore.cat/' <<< "${response}" ; then
./hosts/up_offshorecat.sh:113: hash=$(grep -oPi '(?<="url":"https://files.offshore.cat/).*?(?=".*$)' <<< "$response")
./hosts/up_offshorecat.sh:115: downloadLink="https://files.offshore.cat/${hash}"
./hosts/up_oshi.sh:104: PostUrlHost='http://oshi.at/nossl/'
./hosts/up_oshi.sh:104: PostUrlHost='http://oshi.at/'
./hosts/up_oshi.sh:106: PostUrlHost='http://5ety7tpkim5me6eszuwcje7bmy25pbtrjtue7zkqqgziljwqy3rrikqd.onion/nossl/'
./hosts/up_pixeldrain.sh:107: PostUrlHost='https://pixeldrain.com/api/file/'
./hosts/up_pixeldrain.sh:136: downloadLink="https://pixeldrain.com/u/${hash}"
@ -447,75 +450,75 @@ _________________________________________________________________________
./hosts/up_uwabaki.sh:111: if grep -Eqi 'File uploaded: <a href="https://files.uwabaki.party/' <<< "${response}" ; then
./hosts/up_uwabaki.sh:123: downloadLink="https://files.uwabaki.party${url}"
./hosts/up_yolobit.sh:99: PostUrlHost='https://ns08.zipcluster.com/upload.php'
./mad.sh:717: sed -i -e "s>^${url/https:/http:}.*>#& #OK# ${filename}>g" "${InputFile}" #http (if changed)
./mad.sh:719: sed -i -e "s>^direct=${url/https:/http:}.*>#& #OK# ${filename}>g" "${InputFile}" #direct url https
./mad.sh:722: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:724: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:745: sed -i -e "s>^${url/https:/http:}.*>#& #OK# ${filename} (File exists)>g" "${InputFile}" #http (if changed)
./mad.sh:747: sed -i -e "s>^direct=${url/https:/http:}.*>#& #OK# ${filename} (File exists)>g" "${InputFile}" #direct url https
./mad.sh:750: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:752: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:773: sed -i -e "s>^${url/https:/http:}.*>#& #RETRY# ${message}>g" "${InputFile}" #http (if changed)
./mad.sh:775: sed -i -e "s>^direct=${url/https:/http:}.*>#& #RETRY# ${message}>g" "${InputFile}" #direct url https
./mad.sh:778: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:780: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:802: sed -i -e "s>^${url/https:/http:}.*>#& #FAIL# $message>g" "${InputFile}" #http (if changed)
./mad.sh:804: sed -i -e "s>^direct=${url/https:/http:}.*>#& #FAIL# $message>g" "${InputFile}" #direct url https
./mad.sh:807: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:809: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:833: sed -i -e "s>^${url/https:/http:}.*>#& #REMOVED#${message}>g" "${InputFile}" #http (if changed)
./mad.sh:835: sed -i -e "s>^direct=${url/https:/http:}.*>#& #REMOVED#${message}>g" "${InputFile}" #direct url https
./mad.sh:838: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:840: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:866: sed -i -e "s>^${url/https:/http:}.*>${url}|${newfilename}>g" "${InputFile}" #http (if changed)
./mad.sh:868: sed -i -e "s>^direct=${url/https:/http:}.*>direct=${url}|${newfilename}>g" "${InputFile}" #direct url https
./mad.sh:888: sed -i -e "s%^${url/https:/http:}.*%${newurl//[[:space:]]/$'\\\n'}%g" "${InputFile}" #http (if changed)
./mad.sh:909: sed -i -e "s>^${url/https:/http:}.*>#& #RETRY# ${filename} (dropped or bad size)>g" "${InputFile}" #http (if changed)
./mad.sh:911: sed -i -e "s>^direct=${url/https:/http:}.*>#& #RETRY# ${filename} (dropped or bad size)>g" "${InputFile}" #direct url https
./mad.sh:914: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:916: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:932: sed -i -e "s>^${url/https:/http:}.*>#& #RETRY# (No CDN found)>g" "${InputFile}" #http (if changed)
./mad.sh:934: sed -i -e "s>^direct=${url/https:/http:}.*>#& #RETRY# (No CDN found)>g" "${InputFile}" #direct url https
./mad.sh:937: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:939: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:958: sed -i -e "s>^${url/https:/http:}.*>#& #PASSWORD#>g" "${InputFile}" #http (if changed)
./mad.sh:960: sed -i -e "s>^direct=${url/https:/http:}.*>#& #PASSWORD#>g" "${InputFile}" #direct url https
./mad.sh:963: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:965: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:985: sed -i -e "s>^${url/https:/http:}.*>#& #BAD-URL#${message}>g" "${InputFile}" #http (if changed)
./mad.sh:987: sed -i -e "s>^direct=${url/https:/http:}.*>#& #BAD-URL#${message}>g" "${InputFile}" #direct url https
./mad.sh:990: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:992: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:1010: sed -i -e "s>^${url/https:/http:}.*>#& #RETRY# ${filename} (No filename or size. Try again later)>g" "${InputFile}" #http (if changed)
./mad.sh:1012: sed -i -e "s>^direct=${url/https:/http:}.*>#& #RETRY# ${filename} (No filename or size. Try again later)>g" "${InputFile}" #direct url https
./mad.sh:1015: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:1017: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:1036: sed -i -e "s>^${url/https:/http:}.*>#& #RETRY# ${filename} (File exists and is too large--retry or delete from downloads)>g" "${InputFile}" #http (if changed)
./mad.sh:1038: sed -i -e "s>^direct=${url/https:/http:}.*>#& #RETRY# ${filename} (File exists and is too large--retry or delete from downloads)>g" "${InputFile}" #direct url https
./mad.sh:1041: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:1043: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:1466: response=$(tor_curl_request --insecure -L -s https://github.com/lwthiker/curl-impersonate/releases/latest)
./mad.sh:1483: download_url='https://github.com/lwthiker/curl-impersonate/releases/download/'"$latestTag"'/curl-impersonate-'"$latestTag"'.x86_64-linux-gnu.tar.gz'
./mad.sh:1589: response=$(tor_curl_request --insecure -L -s https://github.com/lexiforest/curl-impersonate/releases/latest)
./mad.sh:1606: download_url='https://github.com/lexiforest/curl-impersonate/releases/download/'"$latestTag"'/curl-impersonate-'"$latestTag"'.x86_64-linux-gnu.tar.gz'
./mad.sh:1869: echo -e "${PINK}MAD Audit of http lines:${NC} (${GREEN}grep \"http:\" or \"https:\"${NC})"
./mad.sh:1897: echo -e "${PINK}MAD Audit of http lines:${NC} (${GREEN}grep \"http:\" or \"https:\"${NC})"
./mad.sh:1919: echo -e "${PINK}MAD Audit of http lines:${NC} (${GREEN}grep \"http:\" or \"https:\"${NC})"
./mad.sh:3235: if grep -Eqi '.onion' <<< "$download_url" && grep -Eqi 'https://' <<< "$download_url" ; then
./mad.sh:3766:arg2="$2" # auto, filelist, <https://url>
./mad.sh:3863: echo -e " - http://oshi.at/abcd/origAABB.rar|My specified file.part1.rar"
./mad.sh:3865: echo -e " - direct=http://pomf2.lain.la/f/abcd00zz.7z"
./mad.sh:3867: echo -e ' - ie. direct=http://somehost.onion/abcD|filename.part1.rar'
./mad.sh:4086: if [[ ${remote_url} =~ ^http: ]] ; then
./mad.sh:4087: remote_url=${remote_url/http:/https:}
./mad.sh:4108: if [[ ${remote_url} =~ ^http: ]] ; then
./mad.sh:4109: remote_url=${remote_url/http:/https:}
./mad.sh:4475: if [[ ${remote_url} =~ ^http: ]] ; then
./mad.sh:4476: remote_url=${remote_url/http:/https:}
./mad.sh:4534: if [[ ${remote_url} =~ ^http: ]] ; then
./mad.sh:4535: remote_url=${remote_url/http:/https:}
./mad.sh:4561: if [[ ${remote_url} =~ ^http: ]] ; then
./mad.sh:4562: remote_url=${remote_url/http:/https:}
./mad.sh:711: sed -i -e "s>^${url/https:/http:}.*>#& #OK# ${filename}>g" "${InputFile}" #http (if changed)
./mad.sh:713: sed -i -e "s>^direct=${url/https:/http:}.*>#& #OK# ${filename}>g" "${InputFile}" #direct url https
./mad.sh:716: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:718: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:739: sed -i -e "s>^${url/https:/http:}.*>#& #OK# ${filename} (File exists)>g" "${InputFile}" #http (if changed)
./mad.sh:741: sed -i -e "s>^direct=${url/https:/http:}.*>#& #OK# ${filename} (File exists)>g" "${InputFile}" #direct url https
./mad.sh:744: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:746: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:767: sed -i -e "s>^${url/https:/http:}.*>#& #RETRY# ${message}>g" "${InputFile}" #http (if changed)
./mad.sh:769: sed -i -e "s>^direct=${url/https:/http:}.*>#& #RETRY# ${message}>g" "${InputFile}" #direct url https
./mad.sh:772: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:774: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:796: sed -i -e "s>^${url/https:/http:}.*>#& #FAIL# $message>g" "${InputFile}" #http (if changed)
./mad.sh:798: sed -i -e "s>^direct=${url/https:/http:}.*>#& #FAIL# $message>g" "${InputFile}" #direct url https
./mad.sh:801: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:803: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:827: sed -i -e "s>^${url/https:/http:}.*>#& #REMOVED#${message}>g" "${InputFile}" #http (if changed)
./mad.sh:829: sed -i -e "s>^direct=${url/https:/http:}.*>#& #REMOVED#${message}>g" "${InputFile}" #direct url https
./mad.sh:832: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:834: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:860: sed -i -e "s>^${url/https:/http:}.*>${url}|${newfilename}>g" "${InputFile}" #http (if changed)
./mad.sh:862: sed -i -e "s>^direct=${url/https:/http:}.*>direct=${url}|${newfilename}>g" "${InputFile}" #direct url https
./mad.sh:882: sed -i -e "s%^${url/https:/http:}.*%${newurl//[[:space:]]/$'\\\n'}%g" "${InputFile}" #http (if changed)
./mad.sh:903: sed -i -e "s>^${url/https:/http:}.*>#& #RETRY# ${filename} (dropped or bad size)>g" "${InputFile}" #http (if changed)
./mad.sh:905: sed -i -e "s>^direct=${url/https:/http:}.*>#& #RETRY# ${filename} (dropped or bad size)>g" "${InputFile}" #direct url https
./mad.sh:908: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:910: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:926: sed -i -e "s>^${url/https:/http:}.*>#& #RETRY# (No CDN found)>g" "${InputFile}" #http (if changed)
./mad.sh:928: sed -i -e "s>^direct=${url/https:/http:}.*>#& #RETRY# (No CDN found)>g" "${InputFile}" #direct url https
./mad.sh:931: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:933: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:952: sed -i -e "s>^${url/https:/http:}.*>#& #PASSWORD#>g" "${InputFile}" #http (if changed)
./mad.sh:954: sed -i -e "s>^direct=${url/https:/http:}.*>#& #PASSWORD#>g" "${InputFile}" #direct url https
./mad.sh:957: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:959: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:979: sed -i -e "s>^${url/https:/http:}.*>#& #BAD-URL#${message}>g" "${InputFile}" #http (if changed)
./mad.sh:981: sed -i -e "s>^direct=${url/https:/http:}.*>#& #BAD-URL#${message}>g" "${InputFile}" #direct url https
./mad.sh:984: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:986: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:1004: sed -i -e "s>^${url/https:/http:}.*>#& #RETRY# ${filename} (No filename or size. Try again later)>g" "${InputFile}" #http (if changed)
./mad.sh:1006: sed -i -e "s>^direct=${url/https:/http:}.*>#& #RETRY# ${filename} (No filename or size. Try again later)>g" "${InputFile}" #direct url https
./mad.sh:1009: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:1011: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:1030: sed -i -e "s>^${url/https:/http:}.*>#& #RETRY# ${filename} (File exists and is too large--retry or delete from downloads)>g" "${InputFile}" #http (if changed)
./mad.sh:1032: sed -i -e "s>^direct=${url/https:/http:}.*>#& #RETRY# ${filename} (File exists and is too large--retry or delete from downloads)>g" "${InputFile}" #direct url https
./mad.sh:1035: sed -i -e "s>^${url/https:/http:}.*>#&>g" "${InputFile}" #http (if changed)
./mad.sh:1037: sed -i -e "s>^direct=${url/https:/http:}.*>#&>g" "${InputFile}" #direct url https
./mad.sh:1460: response=$(tor_curl_request --insecure -L -s https://github.com/lwthiker/curl-impersonate/releases/latest)
./mad.sh:1477: download_url='https://github.com/lwthiker/curl-impersonate/releases/download/'"$latestTag"'/curl-impersonate-'"$latestTag"'.x86_64-linux-gnu.tar.gz'
./mad.sh:1583: response=$(tor_curl_request --insecure -L -s https://github.com/lexiforest/curl-impersonate/releases/latest)
./mad.sh:1600: download_url='https://github.com/lexiforest/curl-impersonate/releases/download/'"$latestTag"'/curl-impersonate-'"$latestTag"'.x86_64-linux-gnu.tar.gz'
./mad.sh:1863: echo -e "${PINK}MAD Audit of http lines:${NC} (${GREEN}grep \"http:\" or \"https:\"${NC})"
./mad.sh:1891: echo -e "${PINK}MAD Audit of http lines:${NC} (${GREEN}grep \"http:\" or \"https:\"${NC})"
./mad.sh:1913: echo -e "${PINK}MAD Audit of http lines:${NC} (${GREEN}grep \"http:\" or \"https:\"${NC})"
./mad.sh:3237: if grep -Eqi '.onion' <<< "$download_url" && grep -Eqi 'https://' <<< "$download_url" ; then
./mad.sh:3772:arg2="$2" # auto, filelist, <https://url>
./mad.sh:3869: echo -e " - http://oshi.at/abcd/origAABB.rar|My specified file.part1.rar"
./mad.sh:3871: echo -e " - direct=http://pomf2.lain.la/f/abcd00zz.7z"
./mad.sh:3873: echo -e ' - ie. direct=http://somehost.onion/abcD|filename.part1.rar'
./mad.sh:4092: if [[ ${remote_url} =~ ^http: ]] ; then
./mad.sh:4093: remote_url=${remote_url/http:/https:}
./mad.sh:4114: if [[ ${remote_url} =~ ^http: ]] ; then
./mad.sh:4115: remote_url=${remote_url/http:/https:}
./mad.sh:4481: if [[ ${remote_url} =~ ^http: ]] ; then
./mad.sh:4482: remote_url=${remote_url/http:/https:}
./mad.sh:4540: if [[ ${remote_url} =~ ^http: ]] ; then
./mad.sh:4541: remote_url=${remote_url/http:/https:}
./mad.sh:4567: if [[ ${remote_url} =~ ^http: ]] ; then
./mad.sh:4568: remote_url=${remote_url/http:/https:}
./plugins/pjscloud.sh:51: "https://PhantomJScloud.com/api/browser/v2/$RandomPjsKey/" & sleep 8s; kill -HUP $! 2>/dev/null)
./plugins/pjscloud.sh:59: "https://PhantomJScloud.com/api/browser/v2/$RandomPjsKey/" & sleep 8s; kill -HUP $! 2>/dev/null)

File diff suppressed because it is too large Load diff

View file

@ -3,6 +3,23 @@
#
# ---------- Initial release with MAD Uploader functionality ----------
# 2025.01.30 - [isupload] Add handling of 404 Not Found on initial page fetch
# 2025.01.23 - [mad] Do not check for supported host on "direct=" lines
# 2025.01.19 - [fileditch] Add direct download url processing fileditchfiles.me (though they block Tor now)
# 2025.01.18 - [up_nantes] Update the post retention to "week" (host removed "month" option)
# 2025.01.18 - [mad] Updates to url_encode function and addition of conversion of utf8 to ascii function
# 2025.01.17 - [ranoz] Servers response to resume changed, set as no resume type for now
# 2025.01.17 - [uwabaki] Add download handling for uwabaki onion address urls
# 2025.01.16 - [ranoz] Fix filenames with unicode chars in the download url
# 2025.01.16 - [up_axfc] Move convert utf8 to ascii to mad function
# 2025.01.16 - [up_uwabaki] Add uwabaki.party as upload host (1GB, no expiration, no DMCA, no logs)
# 2025.01.14 - [gagneux / up_gagneux] Add fichier.gagneux.info as upload / download host
# 2025.01.14 - [uwabaki] Add uwabaki.party as download host
# 2025.01.14 - [fileblade] Additional retries and handling for blocked Tor ips (until alternative)
# 2025.01.13 - [ocr_captcha] Create imagemagick OCR function for testing without tesseract
# 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

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

54
mad.sh
View file

@ -30,9 +30,17 @@
#
# * Everyone who provided feedback and helped test.. and those who wish to remain anonymous
ScriptVersion=2025.02.20
ScriptVersion=2025.02.25
#=================================================
# Recent Additions
# 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)
# 2025.02.20 - [up_ranoz] Fixed parsing of ranoz upload link (cloudflare)
# 2025.02.20 - [sendnow] Better handling of sendnow new Tor ip blocking
# 2025.02.20 - [up_ranoz / up_uploadhive] Add obfuscation of .7z in multipart filename that was missing
@ -62,23 +70,6 @@ ScriptVersion=2025.02.20
# 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
# 2025.01.30 - [isupload] Add handling of 404 Not Found on initial page fetch
# 2025.01.23 - [mad] Do not check for supported host on "direct=" lines
# 2025.01.19 - [fileditch] Add direct download url processing fileditchfiles.me (though they block Tor now)
# 2025.01.18 - [up_nantes] Update the post retention to "week" (host removed "month" option)
# 2025.01.18 - [mad] Updates to url_encode function and addition of conversion of utf8 to ascii function
# 2025.01.17 - [ranoz] Servers response to resume changed, set as no resume type for now
# 2025.01.17 - [uwabaki] Add download handling for uwabaki onion address urls
# 2025.01.16 - [ranoz] Fix filenames with unicode chars in the download url
# 2025.01.16 - [up_axfc] Move convert utf8 to ascii to mad function
# 2025.01.16 - [up_uwabaki] Add uwabaki.party as upload host (1GB, no expiration, no DMCA, no logs)
# 2025.01.14 - [gagneux / up_gagneux] Add fichier.gagneux.info as upload / download host
# 2025.01.14 - [uwabaki] Add uwabaki.party as download host
# 2025.01.14 - [fileblade] Additional retries and handling for blocked Tor ips (until alternative)
# 2025.01.13 - [ocr_captcha] Create imagemagick OCR function for testing without tesseract
# 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
# -- See ./documentation/!Changelog (Historical).txt for further changes -- #
@ -452,7 +443,8 @@ 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,sendnow"
lstEnabledDownloadHosts+="fileland,fireget,euromussels,ramsgaard,uwabaki,gagneux,sendnow,sendspace,"
lstEnabledDownloadHosts+="blackcloud_onion"
elif [[ "$EnabledDownloadHosts" == "online" ]] ; then
lstEnabledDownloadHosts="1fichier,anonsharing,bedrive,biteblob,bowfile,click,cyssoux,"
lstEnabledDownloadHosts+="dailyuploads,dataupload,depotkaz,dictvm,dosya,downloadgg,eddowding,eternalhosting,"
@ -462,7 +454,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,sendnow"
lstEnabledDownloadHosts+="euromussels,ramsgaard,uwabaki,gagneux,sendnow,sendspace,blackcloud_onion"
fi
}
GetRandomFiledotUser() {
@ -2783,13 +2775,19 @@ CheckNoHtml() {
local cde_remote_url=$1
local cde_filename=$2
local cde_file_path=$3
if [[ -f "${cde_file_path}" ]] ; then
badHtml=$(grep -aoPi '^.*(</HTML>|</script>|content-type|:error|not found|too many connections).*$' "${cde_file_path}")
local partial_size=$4
local tmp_partial="${WorkDir}/.temp/${cde_filename}_${partial_size}.10kb.part"
local curr_filesize=$(stat --format="%s" "${cde_file_path}" | tr -d '[:space:]')
mkdir -p "${WorkDir}/.temp"
head -c "10240" > "$tmp_partial" < <(exec tail -c "$partial_size" "$cde_file_path")
if [[ -f "${cde_file_path}" ]] ; then
badHtml=$(grep -aoPi '^.*(</HTML>|</script>|content-type|:error|not found|too many connections).*$' "${tmp_partial}")
if [[ "$badHtml" == "" ]]; then
rm -f "${tmp_partial}"
return 0
else
if [[ "${DebugAllEnabled}" == "true" ]] ; then
cp "$cde_file_path" "${WorkDir}/.debug/$cde_filename.htmldebug.txt"
cp "$tmp_partial" "${WorkDir}/.debug/$cde_filename.htmldebug.txt"
fi
if [[ "${DebugAllEnabled}" == "true" ]] ; then
echo -e ""
@ -2804,9 +2802,11 @@ CheckNoHtml() {
echo -e "BadHtml: ${badHtml}" >> "${WorkDir}/.debug/_err.log"
echo -e ""
fi
rm -f "${tmp_partial}"
return 1
fi
else
rm -f "${tmp_partial}"
return 0
fi
}
@ -3416,7 +3416,11 @@ direct_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
@ -3456,7 +3460,7 @@ direct_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