# 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
This commit is contained in:
parent
d62376f7a8
commit
6f338dec65
7 changed files with 456 additions and 449 deletions
|
|
@ -1,4 +1,4 @@
|
|||
DateTime: 25.02.19
|
||||
DateTime: 25.02.20
|
||||
|
||||
Files:
|
||||
./hosts/1fichier.sh
|
||||
|
|
@ -3007,29 +3007,29 @@ _________________________________________________________________________
|
|||
./hosts/up_quax.sh:111: url=$(grep -oPi '(?<="url": ").*?(?=".*$)' <<< "$response")
|
||||
./hosts/up_quax.sh:112: filesize=$(GetFileSize "$filepath" "false")
|
||||
--
|
||||
./hosts/up_ranoz.sh:128: response=$(tor_curl_upload --insecure -L -i -s \
|
||||
./hosts/up_ranoz.sh:129: "$PostUrlHost" \
|
||||
./hosts/up_ranoz.sh:130: -H "Content-Type: application/json" \
|
||||
./hosts/up_ranoz.sh:131: -d "{ \
|
||||
./hosts/up_ranoz.sh:132: \"filename\": \"$tmpfilename\", \
|
||||
./hosts/up_ranoz.sh:133: \"size\": $fsize}")
|
||||
./hosts/up_ranoz.sh:134: if [[ "${DebugAllEnabled}" == "true" ]] ; then
|
||||
./hosts/up_ranoz.sh:135: debugHtml "${filepath##*/}" "${_hostCode}_ticket" "post_url: ${PostUrlHost}"$'\n'"data: ${filepath}, ${fsize}"$'\n'"${response}"
|
||||
./hosts/up_ranoz.sh:136: fi
|
||||
./hosts/up_ranoz.sh:137: if grep -Eqi '"upload_url":"https://' <<< "$response" ; then
|
||||
./hosts/up_ranoz.sh:138: PostUrlHost=$(grep -oPi '(?<="upload_url":").*?(?=".*$)' <<< "$response")
|
||||
./hosts/up_ranoz.sh:129: response=$(tor_curl_upload --insecure -L -i -s \
|
||||
./hosts/up_ranoz.sh:130: "$PostUrlHost" \
|
||||
./hosts/up_ranoz.sh:131: -H "Content-Type: application/json" \
|
||||
./hosts/up_ranoz.sh:132: -d "{ \
|
||||
./hosts/up_ranoz.sh:133: \"filename\": \"$tmpfilename\", \
|
||||
./hosts/up_ranoz.sh:134: \"size\": $fsize}")
|
||||
./hosts/up_ranoz.sh:135: if [[ "${DebugAllEnabled}" == "true" ]] ; then
|
||||
./hosts/up_ranoz.sh:136: debugHtml "${filepath##*/}" "${_hostCode}_ticket" "post_url: ${PostUrlHost}"$'\n'"data: ${filepath}, ${fsize}"$'\n'"${response}"
|
||||
./hosts/up_ranoz.sh:137: fi
|
||||
./hosts/up_ranoz.sh:138: if grep -Eqi '"upload_url":"https://' <<< "$response" ; then
|
||||
./hosts/up_ranoz.sh:139: PostUrlHost=$(grep -oPi '(?<="upload_url":").*?(?=".*$)' <<< "$response")
|
||||
--
|
||||
./hosts/up_ranoz.sh:155: response=$(tor_curl_upload --insecure -i -X PUT \
|
||||
./hosts/up_ranoz.sh:156: "${PostUrlHost}" \
|
||||
./hosts/up_ranoz.sh:157: --upload-file "$filepath" \
|
||||
./hosts/up_ranoz.sh:158: -H "Content-Length: $fsize")
|
||||
./hosts/up_ranoz.sh:159: if [[ "${DebugAllEnabled}" == "true" ]] ; then
|
||||
./hosts/up_ranoz.sh:160: debugHtml "${filepath##*/}" "${_hostCode}_upload" "post_url: ${PostUrlHost}"$'\n'"${response}"
|
||||
./hosts/up_ranoz.sh:161: fi
|
||||
./hosts/up_ranoz.sh:162: if grep -Eqi 'HTTP/.* 200' <<< "${response}" ; then
|
||||
./hosts/up_ranoz.sh:163: filesize=$(GetFileSize "$filepath" "false")
|
||||
./hosts/up_ranoz.sh:164: echo -e "${GREEN}| Upload Success${NC}"
|
||||
./hosts/up_ranoz.sh:165: echo -e "| Size: ${BLUE}${filesize}${NC} bytes${NC}"
|
||||
./hosts/up_ranoz.sh:156: response=$(tor_curl_upload --insecure -i -X PUT \
|
||||
./hosts/up_ranoz.sh:157: "${PostUrlHost}" \
|
||||
./hosts/up_ranoz.sh:158: --upload-file "$filepath" \
|
||||
./hosts/up_ranoz.sh:159: -H "Content-Length: $fsize")
|
||||
./hosts/up_ranoz.sh:160: if [[ "${DebugAllEnabled}" == "true" ]] ; then
|
||||
./hosts/up_ranoz.sh:161: debugHtml "${filepath##*/}" "${_hostCode}_upload" "post_url: ${PostUrlHost}"$'\n'"${response}"
|
||||
./hosts/up_ranoz.sh:162: fi
|
||||
./hosts/up_ranoz.sh:163: if grep -Eqi 'HTTP/.* 200' <<< "${response}" ; then
|
||||
./hosts/up_ranoz.sh:164: filesize=$(GetFileSize "$filepath" "false")
|
||||
./hosts/up_ranoz.sh:165: echo -e "${GREEN}| Upload Success${NC}"
|
||||
./hosts/up_ranoz.sh:166: echo -e "| Size: ${BLUE}${filesize}${NC} bytes${NC}"
|
||||
--
|
||||
./hosts/up_sendnow.sh:101: response=$(tor_curl_request --insecure -L -s 'https://send.now/upload')
|
||||
./hosts/up_sendnow.sh:102: if [[ "${DebugAllEnabled}" == "true" ]] ; then
|
||||
|
|
@ -3199,17 +3199,17 @@ _________________________________________________________________________
|
|||
./hosts/up_uploadflix.sh:115: -F "upload=Start upload" \
|
||||
./hosts/up_uploadflix.sh:116: -F "keepalive=1" \
|
||||
--
|
||||
./hosts/up_uploadhive.sh:130: response=$(tor_curl_upload --insecure -i \
|
||||
./hosts/up_uploadhive.sh:131: -H "Content-Type: multipart/form-data" \
|
||||
./hosts/up_uploadhive.sh:132: -F "sess_id=" \
|
||||
./hosts/up_uploadhive.sh:133: -F "utype=anon" \
|
||||
./hosts/up_uploadhive.sh:134: -F "link_rcpt=" \
|
||||
./hosts/up_uploadhive.sh:135: -F "link_pass=" \
|
||||
./hosts/up_uploadhive.sh:136: -F "to_folder=" \
|
||||
./hosts/up_uploadhive.sh:137: -F "file_descr=" \
|
||||
./hosts/up_uploadhive.sh:138: -F "file_public=1" \
|
||||
./hosts/up_uploadhive.sh:139: -F "upload=Start upload" \
|
||||
./hosts/up_uploadhive.sh:140: -F "file_0=@$tmpfilepath" \
|
||||
./hosts/up_uploadhive.sh:131: response=$(tor_curl_upload --insecure -i \
|
||||
./hosts/up_uploadhive.sh:132: -H "Content-Type: multipart/form-data" \
|
||||
./hosts/up_uploadhive.sh:133: -F "sess_id=" \
|
||||
./hosts/up_uploadhive.sh:134: -F "utype=anon" \
|
||||
./hosts/up_uploadhive.sh:135: -F "link_rcpt=" \
|
||||
./hosts/up_uploadhive.sh:136: -F "link_pass=" \
|
||||
./hosts/up_uploadhive.sh:137: -F "to_folder=" \
|
||||
./hosts/up_uploadhive.sh:138: -F "file_descr=" \
|
||||
./hosts/up_uploadhive.sh:139: -F "file_public=1" \
|
||||
./hosts/up_uploadhive.sh:140: -F "upload=Start upload" \
|
||||
./hosts/up_uploadhive.sh:141: -F "file_0=@$tmpfilepath" \
|
||||
--
|
||||
./hosts/up_uploadraja.sh:102: response=$(tor_curl_upload --insecure -i \
|
||||
./hosts/up_uploadraja.sh:103: -H "Content-Type: multipart/form-data" \
|
||||
|
|
@ -3297,235 +3297,235 @@ _________________________________________________________________________
|
|||
./hosts/youdbox.sh:287: containsHtml=true
|
||||
./hosts/youdbox.sh:288: fi
|
||||
--
|
||||
./mad.sh:393:tor_curl_request() {
|
||||
./mad.sh:394: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
|
||||
./mad.sh:395: "${curl_impersonate[@]}" --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeout} --compressed --globoff "$@"
|
||||
./mad.sh:396: else
|
||||
./mad.sh:397: curl --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeout} --compressed --globoff "$@"
|
||||
./mad.sh:398: fi
|
||||
./mad.sh:399:}
|
||||
./mad.sh:400:tor_curl_request_extended() {
|
||||
./mad.sh:401: randomtimeout=$((30 + RANDOM % (60 - 30)))
|
||||
./mad.sh:402: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
|
||||
./mad.sh:403: "${curl_impersonate[@]}" --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout $randomtimeout --compressed --globoff "$@"
|
||||
./mad.sh:404: else
|
||||
./mad.sh:405: curl --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout $randomtimeout --compressed --globoff "$@"
|
||||
./mad.sh:406: fi
|
||||
./mad.sh:407:}
|
||||
./mad.sh:408:tor_curl_upload() {
|
||||
./mad.sh:409: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
|
||||
./mad.sh:410: if [[ "${RateMonitorEnabled}" == "true" ]]; then
|
||||
./mad.sh:411: "${curl_impersonate[@]}" --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeoutUpload} --speed-limit $UploadSpeedMin --speed-time $UploadTimeoutInterval --compressed --globoff "$@"
|
||||
./mad.sh:412: else
|
||||
./mad.sh:413: "${curl_impersonate[@]}" --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeoutUpload} --compressed --globoff "$@"
|
||||
./mad.sh:414: fi
|
||||
./mad.sh:415: else
|
||||
./mad.sh:416: if [[ "${RateMonitorEnabled}" == "true" ]]; then
|
||||
./mad.sh:417: 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:418: else
|
||||
./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:397: else
|
||||
./mad.sh:398: curl --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeout} --compressed --globoff "$@"
|
||||
./mad.sh:399: fi
|
||||
./mad.sh:400:}
|
||||
./mad.sh:401:tor_curl_request_extended() {
|
||||
./mad.sh:402: randomtimeout=$((30 + RANDOM % (60 - 30)))
|
||||
./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:405: else
|
||||
./mad.sh:406: curl --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout $randomtimeout --compressed --globoff "$@"
|
||||
./mad.sh:407: fi
|
||||
./mad.sh:408:}
|
||||
./mad.sh:409:tor_curl_upload() {
|
||||
./mad.sh:410: if [[ "${UseTorCurlImpersonate}" == "true" ]]; then
|
||||
./mad.sh:411: if [[ "${RateMonitorEnabled}" == "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:413: else
|
||||
./mad.sh:414: "${curl_impersonate[@]}" --proxy "socks5h://${tor_identity}@${TorIp}:${torPort}" -4 --connect-timeout ${ConnectTimeoutUpload} --compressed --globoff "$@"
|
||||
./mad.sh:415: fi
|
||||
./mad.sh:416: else
|
||||
./mad.sh:417: if [[ "${RateMonitorEnabled}" == "true" ]]; then
|
||||
./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:419: else
|
||||
--
|
||||
./mad.sh:1465: response=$(tor_curl_request --insecure -L -s https://github.com/lwthiker/curl-impersonate/releases/latest)
|
||||
./mad.sh:1466: if [[ "${DebugAllEnabled}" == "true" ]] ; then
|
||||
./mad.sh:1467: debugHtml "github" "lbf_inst_curlimp$j" "$response"
|
||||
./mad.sh:1468: fi
|
||||
./mad.sh:1469: if [[ ! -z "$response" ]]; then
|
||||
./mad.sh:1470: latestTag=$(grep -oPi -m 1 '(?<=/curl-impersonate/releases/tag/).*?(?=")' <<< "$response")
|
||||
./mad.sh:1471: latestBinaryDate=$(grep -oPi -m 1 '(?<=<relative-time class="no-wrap" prefix="" datetime=").*?(?=T)' <<< "$response")
|
||||
./mad.sh:1472: break
|
||||
./mad.sh:1473: fi
|
||||
./mad.sh:1474: done
|
||||
./mad.sh:1475: if [[ -z $latestTag ]]; then
|
||||
./mad.sh:1466: response=$(tor_curl_request --insecure -L -s https://github.com/lwthiker/curl-impersonate/releases/latest)
|
||||
./mad.sh:1467: if [[ "${DebugAllEnabled}" == "true" ]] ; then
|
||||
./mad.sh:1468: debugHtml "github" "lbf_inst_curlimp$j" "$response"
|
||||
./mad.sh:1469: fi
|
||||
./mad.sh:1470: if [[ ! -z "$response" ]]; then
|
||||
./mad.sh:1471: latestTag=$(grep -oPi -m 1 '(?<=/curl-impersonate/releases/tag/).*?(?=")' <<< "$response")
|
||||
./mad.sh:1472: latestBinaryDate=$(grep -oPi -m 1 '(?<=<relative-time class="no-wrap" prefix="" datetime=").*?(?=T)' <<< "$response")
|
||||
./mad.sh:1473: break
|
||||
./mad.sh:1474: fi
|
||||
./mad.sh:1475: done
|
||||
./mad.sh:1476: if [[ -z $latestTag ]]; then
|
||||
--
|
||||
./mad.sh:1485: file_header=$(tor_curl_request --insecure --head -Ls "$download_url")
|
||||
./mad.sh:1486: if [[ "${DebugAllEnabled}" == "true" ]] ; then
|
||||
./mad.sh:1487: debugHtml "github" "head_inst_curlimp$j" "${file_header}"
|
||||
./mad.sh:1488: fi
|
||||
./mad.sh:1489: if ! grep -Eqi 'HTTP/2 200|HTTP/1.1 200|200 OK' <<< $file_header ; then
|
||||
./mad.sh:1490: if ((j == 8)) ; then
|
||||
./mad.sh:1491: return 1
|
||||
./mad.sh:1492: else
|
||||
./mad.sh:1493: continue
|
||||
./mad.sh:1494: fi
|
||||
./mad.sh:1495: fi
|
||||
./mad.sh:1486: file_header=$(tor_curl_request --insecure --head -Ls "$download_url")
|
||||
./mad.sh:1487: if [[ "${DebugAllEnabled}" == "true" ]] ; then
|
||||
./mad.sh:1488: debugHtml "github" "head_inst_curlimp$j" "${file_header}"
|
||||
./mad.sh:1489: fi
|
||||
./mad.sh:1490: if ! grep -Eqi 'HTTP/2 200|HTTP/1.1 200|200 OK' <<< $file_header ; then
|
||||
./mad.sh:1491: if ((j == 8)) ; then
|
||||
./mad.sh:1492: return 1
|
||||
./mad.sh:1493: else
|
||||
./mad.sh:1494: continue
|
||||
./mad.sh:1495: fi
|
||||
./mad.sh:1496: fi
|
||||
--
|
||||
./mad.sh:1535: tor_curl_request --insecure -L "$download_url" --continue-at - --output "$file_path"
|
||||
./mad.sh:1536: received_file_size=0
|
||||
./mad.sh:1537: if [[ -f "$file_path" ]] ; then
|
||||
./mad.sh:1538: received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
|
||||
./mad.sh:1539: fi
|
||||
./mad.sh:1540: if ((received_file_size == file_size_bytes)) ; then
|
||||
./mad.sh:1541: break
|
||||
./mad.sh:1542: elif ((received_file_size < file_size_bytes)) ; then
|
||||
./mad.sh:1543: if ((j >= MaxDownloadRetries)) ; then
|
||||
./mad.sh:1544: echo -e "${RED}| FAILED: Size mismatch after downloading${NC}"
|
||||
./mad.sh:1545: exit 1
|
||||
./mad.sh:1536: tor_curl_request --insecure -L "$download_url" --continue-at - --output "$file_path"
|
||||
./mad.sh:1537: received_file_size=0
|
||||
./mad.sh:1538: if [[ -f "$file_path" ]] ; then
|
||||
./mad.sh:1539: received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
|
||||
./mad.sh:1540: fi
|
||||
./mad.sh:1541: if ((received_file_size == file_size_bytes)) ; then
|
||||
./mad.sh:1542: break
|
||||
./mad.sh:1543: elif ((received_file_size < file_size_bytes)) ; then
|
||||
./mad.sh:1544: if ((j >= MaxDownloadRetries)) ; then
|
||||
./mad.sh:1545: echo -e "${RED}| FAILED: Size mismatch after downloading${NC}"
|
||||
./mad.sh:1546: exit 1
|
||||
--
|
||||
./mad.sh:1588: response=$(tor_curl_request --insecure -L -s https://github.com/lexiforest/curl-impersonate/releases/latest)
|
||||
./mad.sh:1589: if [[ "${DebugAllEnabled}" == "true" ]] ; then
|
||||
./mad.sh:1590: debugHtml "github" "lbf_inst_curlimp$j" "$response"
|
||||
./mad.sh:1591: fi
|
||||
./mad.sh:1592: if [[ ! -z "$response" ]]; then
|
||||
./mad.sh:1593: latestTag=$(grep -oPi -m 1 '(?<=/curl-impersonate/releases/tag/).*?(?=")' <<< "$response")
|
||||
./mad.sh:1594: latestBinaryDate=$(grep -oPi -m 1 '(?<=<relative-time class="no-wrap" prefix="" datetime=").*?(?=T)' <<< "$response")
|
||||
./mad.sh:1595: break
|
||||
./mad.sh:1596: fi
|
||||
./mad.sh:1597: done
|
||||
./mad.sh:1598: if [[ -z $latestTag ]]; then
|
||||
./mad.sh:1589: response=$(tor_curl_request --insecure -L -s https://github.com/lexiforest/curl-impersonate/releases/latest)
|
||||
./mad.sh:1590: if [[ "${DebugAllEnabled}" == "true" ]] ; then
|
||||
./mad.sh:1591: debugHtml "github" "lbf_inst_curlimp$j" "$response"
|
||||
./mad.sh:1592: fi
|
||||
./mad.sh:1593: if [[ ! -z "$response" ]]; then
|
||||
./mad.sh:1594: latestTag=$(grep -oPi -m 1 '(?<=/curl-impersonate/releases/tag/).*?(?=")' <<< "$response")
|
||||
./mad.sh:1595: latestBinaryDate=$(grep -oPi -m 1 '(?<=<relative-time class="no-wrap" prefix="" datetime=").*?(?=T)' <<< "$response")
|
||||
./mad.sh:1596: break
|
||||
./mad.sh:1597: fi
|
||||
./mad.sh:1598: done
|
||||
./mad.sh:1599: if [[ -z $latestTag ]]; then
|
||||
--
|
||||
./mad.sh:1608: file_header=$(tor_curl_request --insecure --head -Ls "$download_url")
|
||||
./mad.sh:1609: if [[ "${DebugAllEnabled}" == "true" ]] ; then
|
||||
./mad.sh:1610: debugHtml "github" "head_inst_curlimp$j" "${file_header}"
|
||||
./mad.sh:1611: fi
|
||||
./mad.sh:1612: if ! grep -Eqi 'HTTP/2 200|HTTP/1.1 200|200 OK' <<< $file_header ; then
|
||||
./mad.sh:1613: if ((j == 8)) ; then
|
||||
./mad.sh:1614: return 1
|
||||
./mad.sh:1615: else
|
||||
./mad.sh:1616: continue
|
||||
./mad.sh:1617: fi
|
||||
./mad.sh:1618: fi
|
||||
./mad.sh:1609: file_header=$(tor_curl_request --insecure --head -Ls "$download_url")
|
||||
./mad.sh:1610: if [[ "${DebugAllEnabled}" == "true" ]] ; then
|
||||
./mad.sh:1611: debugHtml "github" "head_inst_curlimp$j" "${file_header}"
|
||||
./mad.sh:1612: fi
|
||||
./mad.sh:1613: if ! grep -Eqi 'HTTP/2 200|HTTP/1.1 200|200 OK' <<< $file_header ; then
|
||||
./mad.sh:1614: if ((j == 8)) ; then
|
||||
./mad.sh:1615: return 1
|
||||
./mad.sh:1616: else
|
||||
./mad.sh:1617: continue
|
||||
./mad.sh:1618: fi
|
||||
./mad.sh:1619: fi
|
||||
--
|
||||
./mad.sh:1658: tor_curl_request --insecure -L "$download_url" --continue-at - --output "$file_path"
|
||||
./mad.sh:1659: received_file_size=0
|
||||
./mad.sh:1660: if [[ -f "$file_path" ]] ; then
|
||||
./mad.sh:1661: received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
|
||||
./mad.sh:1662: fi
|
||||
./mad.sh:1663: if ((received_file_size == file_size_bytes)) ; then
|
||||
./mad.sh:1664: break
|
||||
./mad.sh:1665: elif ((received_file_size < file_size_bytes)) ; then
|
||||
./mad.sh:1666: if ((j >= MaxDownloadRetries)) ; then
|
||||
./mad.sh:1667: echo -e "${RED}| FAILED: Size mismatch after downloading${NC}"
|
||||
./mad.sh:1668: exit 1
|
||||
./mad.sh:1659: tor_curl_request --insecure -L "$download_url" --continue-at - --output "$file_path"
|
||||
./mad.sh:1660: received_file_size=0
|
||||
./mad.sh:1661: if [[ -f "$file_path" ]] ; then
|
||||
./mad.sh:1662: received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
|
||||
./mad.sh:1663: fi
|
||||
./mad.sh:1664: if ((received_file_size == file_size_bytes)) ; then
|
||||
./mad.sh:1665: break
|
||||
./mad.sh:1666: elif ((received_file_size < file_size_bytes)) ; then
|
||||
./mad.sh:1667: if ((j >= MaxDownloadRetries)) ; then
|
||||
./mad.sh:1668: echo -e "${RED}| FAILED: Size mismatch after downloading${NC}"
|
||||
./mad.sh:1669: exit 1
|
||||
--
|
||||
./mad.sh:1863: maud_torcurl=$(grep -n -vxE '[[:blank:]]*([#].*)?' $fil | grep -A 12 --color='always' -Ei 'tor_curl')
|
||||
./mad.sh:1864: echo -e "Files:"
|
||||
./mad.sh:1865: echo -e "${BLUE}${fil}${NC}"
|
||||
./mad.sh:1866: echo -e ""
|
||||
./mad.sh:1864: maud_torcurl=$(grep -n -vxE '[[:blank:]]*([#].*)?' $fil | grep -A 12 --color='always' -Ei 'tor_curl')
|
||||
./mad.sh:1865: echo -e "Files:"
|
||||
./mad.sh:1866: echo -e "${BLUE}${fil}${NC}"
|
||||
./mad.sh:1867: echo -e ""
|
||||
./mad.sh:1868: echo -e "${PINK}MAD Audit of http lines:${NC} (${GREEN}grep \"http:\" or \"https:\"${NC})"
|
||||
./mad.sh:1869: echo -e "_________________________________________________________________________"
|
||||
./mad.sh:1870: echo -e "$maud_http"
|
||||
./mad.sh:1871: echo -e ""
|
||||
./mad.sh:1872: echo -e "${PINK}MAD Audit of curl:${NC} (${GREEN}grep \"curl\"${NC})"
|
||||
./mad.sh:1873: echo -e "_________________________________________________________________________"
|
||||
./mad.sh:1868: echo -e ""
|
||||
./mad.sh:1869: echo -e "${PINK}MAD Audit of http lines:${NC} (${GREEN}grep \"http:\" or \"https:\"${NC})"
|
||||
./mad.sh:1870: echo -e "_________________________________________________________________________"
|
||||
./mad.sh:1871: echo -e "$maud_http"
|
||||
./mad.sh:1872: echo -e ""
|
||||
./mad.sh:1873: echo -e "${PINK}MAD Audit of curl:${NC} (${GREEN}grep \"curl\"${NC})"
|
||||
./mad.sh:1874: echo -e "_________________________________________________________________________"
|
||||
--
|
||||
./mad.sh:1876: echo -e "${PINK}MAD Audit of tor_curl (+12 lines after):${NC} (${GREEN}grep \"tor_curl\"${NC})"
|
||||
./mad.sh:1877: echo -e "_________________________________________________________________________"
|
||||
./mad.sh:1878: echo -e "$maud_torcurl"
|
||||
./mad.sh:1879: echo -e ""
|
||||
./mad.sh:1877: echo -e "${PINK}MAD Audit of tor_curl (+12 lines after):${NC} (${GREEN}grep \"tor_curl\"${NC})"
|
||||
./mad.sh:1878: echo -e "_________________________________________________________________________"
|
||||
./mad.sh:1879: echo -e "$maud_torcurl"
|
||||
./mad.sh:1880: echo -e ""
|
||||
./mad.sh:1881: done
|
||||
./mad.sh:1882: else
|
||||
./mad.sh:1883: cd "$ScriptDir"
|
||||
./mad.sh:1884: readarray -d $'' arrFiles < <(find . -name "*.sh" -printf '%p\n' | sort -Vk1)
|
||||
./mad.sh:1885: cd "$WorkDir"
|
||||
./mad.sh:1886: readarray -d $'' arrFiles2 < <(find . -name "*.sh" -printf '%p\n' | sort -Vk1)
|
||||
./mad.sh:1881: echo -e ""
|
||||
./mad.sh:1882: done
|
||||
./mad.sh:1883: else
|
||||
./mad.sh:1884: cd "$ScriptDir"
|
||||
./mad.sh:1885: readarray -d $'' arrFiles < <(find . -name "*.sh" -printf '%p\n' | sort -Vk1)
|
||||
./mad.sh:1886: cd "$WorkDir"
|
||||
./mad.sh:1887: readarray -d $'' arrFiles2 < <(find . -name "*.sh" -printf '%p\n' | sort -Vk1)
|
||||
--
|
||||
./mad.sh:1891: maud_torcurl=$(grep -n -vxE '[[:blank:]]*([#].*)?' $fil | grep -A 12 --color='always' -Ei 'tor_curl')
|
||||
./mad.sh:1892: echo -e "Files:"
|
||||
./mad.sh:1893: echo -e "${BLUE}${fil}${NC}"
|
||||
./mad.sh:1894: echo -e ""
|
||||
./mad.sh:1892: maud_torcurl=$(grep -n -vxE '[[:blank:]]*([#].*)?' $fil | grep -A 12 --color='always' -Ei 'tor_curl')
|
||||
./mad.sh:1893: echo -e "Files:"
|
||||
./mad.sh:1894: echo -e "${BLUE}${fil}${NC}"
|
||||
./mad.sh:1895: echo -e ""
|
||||
./mad.sh:1896: echo -e "${PINK}MAD Audit of http lines:${NC} (${GREEN}grep \"http:\" or \"https:\"${NC})"
|
||||
./mad.sh:1897: echo -e "_________________________________________________________________________"
|
||||
./mad.sh:1898: echo -e "$maud_http"
|
||||
./mad.sh:1899: echo -e ""
|
||||
./mad.sh:1900: echo -e "${PINK}MAD Audit of curl:${NC} (${GREEN}grep \"curl \"${NC})"
|
||||
./mad.sh:1901: echo -e "_________________________________________________________________________"
|
||||
./mad.sh:1896: echo -e ""
|
||||
./mad.sh:1897: echo -e "${PINK}MAD Audit of http lines:${NC} (${GREEN}grep \"http:\" or \"https:\"${NC})"
|
||||
./mad.sh:1898: echo -e "_________________________________________________________________________"
|
||||
./mad.sh:1899: echo -e "$maud_http"
|
||||
./mad.sh:1900: echo -e ""
|
||||
./mad.sh:1901: echo -e "${PINK}MAD Audit of curl:${NC} (${GREEN}grep \"curl \"${NC})"
|
||||
./mad.sh:1902: echo -e "_________________________________________________________________________"
|
||||
--
|
||||
./mad.sh:1904: echo -e "${PINK}MAD Audit of tor_curl (+12 lines after):${NC} (${GREEN}grep \"tor_curl\"${NC})"
|
||||
./mad.sh:1905: echo -e "_________________________________________________________________________"
|
||||
./mad.sh:1906: echo -e "$maud_torcurl"
|
||||
./mad.sh:1907: echo -e ""
|
||||
./mad.sh:1908: done
|
||||
./mad.sh:1909: for fil in "${arrFiles2[@]}";
|
||||
./mad.sh:1910: do
|
||||
./mad.sh:1911: maud_http=$(grep -n -vxE '[[:blank:]]*([#].*)?' $fil | grep --color='always' -Ei '(http|https):')
|
||||
./mad.sh:1912: maud_curl=$(grep -n -vxE '[[:blank:]]*([#].*)?' $fil | grep --color='always' -Ei 'curl')
|
||||
./mad.sh:1913: maud_torcurl=$(grep -n -vxE '[[:blank:]]*([#].*)?' $fil | grep -A 12 --color='always' -Ei 'tor_curl')
|
||||
./mad.sh:1914: echo -e "Files:"
|
||||
./mad.sh:1915: echo -e "${BLUE}${fil}${NC}"
|
||||
./mad.sh:1916: echo -e ""
|
||||
./mad.sh:1905: echo -e "${PINK}MAD Audit of tor_curl (+12 lines after):${NC} (${GREEN}grep \"tor_curl\"${NC})"
|
||||
./mad.sh:1906: echo -e "_________________________________________________________________________"
|
||||
./mad.sh:1907: echo -e "$maud_torcurl"
|
||||
./mad.sh:1908: echo -e ""
|
||||
./mad.sh:1909: done
|
||||
./mad.sh:1910: for fil in "${arrFiles2[@]}";
|
||||
./mad.sh:1911: do
|
||||
./mad.sh:1912: maud_http=$(grep -n -vxE '[[:blank:]]*([#].*)?' $fil | grep --color='always' -Ei '(http|https):')
|
||||
./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:1915: echo -e "Files:"
|
||||
./mad.sh:1916: echo -e "${BLUE}${fil}${NC}"
|
||||
./mad.sh:1917: echo -e ""
|
||||
./mad.sh:1918: echo -e "${PINK}MAD Audit of http lines:${NC} (${GREEN}grep \"http:\" or \"https:\"${NC})"
|
||||
./mad.sh:1919: echo -e "_________________________________________________________________________"
|
||||
./mad.sh:1920: echo -e "$maud_http"
|
||||
./mad.sh:1921: echo -e ""
|
||||
./mad.sh:1922: echo -e "${PINK}MAD Audit of curl:${NC} (${GREEN}grep \"curl\"${NC})"
|
||||
./mad.sh:1923: echo -e "_________________________________________________________________________"
|
||||
./mad.sh:1918: echo -e ""
|
||||
./mad.sh:1919: echo -e "${PINK}MAD Audit of http lines:${NC} (${GREEN}grep \"http:\" or \"https:\"${NC})"
|
||||
./mad.sh:1920: echo -e "_________________________________________________________________________"
|
||||
./mad.sh:1921: echo -e "$maud_http"
|
||||
./mad.sh:1922: echo -e ""
|
||||
./mad.sh:1923: echo -e "${PINK}MAD Audit of curl:${NC} (${GREEN}grep \"curl\"${NC})"
|
||||
./mad.sh:1924: echo -e "_________________________________________________________________________"
|
||||
--
|
||||
./mad.sh:1926: echo -e "${PINK}MAD Audit of tor_curl (+12 lines after):${NC} (${GREEN}grep \"tor_curl\"${NC})"
|
||||
./mad.sh:1927: echo -e "_________________________________________________________________________"
|
||||
./mad.sh:1928: echo -e "$maud_torcurl"
|
||||
./mad.sh:1929: echo -e ""
|
||||
./mad.sh:1930: done
|
||||
./mad.sh:1931: fi
|
||||
./mad.sh:1932:}
|
||||
./mad.sh:1933:madStatus() {
|
||||
./mad.sh:1934: local InputFile="$1"
|
||||
./mad.sh:1935: if [[ "$arg1" == "status" ]] ; then
|
||||
./mad.sh:1936: clear
|
||||
./mad.sh:1927: echo -e "${PINK}MAD Audit of tor_curl (+12 lines after):${NC} (${GREEN}grep \"tor_curl\"${NC})"
|
||||
./mad.sh:1928: echo -e "_________________________________________________________________________"
|
||||
./mad.sh:1929: echo -e "$maud_torcurl"
|
||||
./mad.sh:1930: echo -e ""
|
||||
./mad.sh:1931: done
|
||||
./mad.sh:1932: fi
|
||||
./mad.sh:1933:}
|
||||
./mad.sh:1934:madStatus() {
|
||||
./mad.sh:1935: local InputFile="$1"
|
||||
./mad.sh:1936: if [[ "$arg1" == "status" ]] ; then
|
||||
./mad.sh:1937: clear
|
||||
--
|
||||
./mad.sh:3251: file_header=$(tor_curl_request --insecure -m 8 -s -D - -o /dev/null \
|
||||
./mad.sh:3252: -H "Connection: keep-alive" \
|
||||
./mad.sh:3253: -w 'EffectiveUrl=%{url_effective}' \
|
||||
./mad.sh:3254: "$download_url")
|
||||
./mad.sh:3255: else
|
||||
./mad.sh:3256: printf "| Retrieving Head: attempt #$j"
|
||||
./mad.sh:3257: rm -f "${WorkDir}/.temp/directhead"
|
||||
./mad.sh:3258: file_header=$(tor_curl_request --insecure --head -H "Connection: keep-alive" -L -s -i "$download_url" |
|
||||
./mad.sh:3259: tee "${WorkDir}/.temp/directhead" &
|
||||
./mad.sh:3260: sleep 6
|
||||
./mad.sh:3261: [ -s "${WorkDir}/.temp/directhead" ]
|
||||
./mad.sh:3262: kill $! 2>/dev/null
|
||||
./mad.sh:3263: )
|
||||
./mad.sh:3264: if [[ ! -f "${WorkDir}/.flocks/${remote_url//[^a-zA-Z0-9]/}" ]]; then
|
||||
./mad.sh:3265: touch "${WorkDir}/.flocks/${remote_url//[^a-zA-Z0-9]/}"
|
||||
./mad.sh:3266: fi
|
||||
./mad.sh:3267: rm -f "${WorkDir}/.temp/directhead"
|
||||
./mad.sh:3268: fi
|
||||
./mad.sh:3252: file_header=$(tor_curl_request --insecure -m 8 -s -D - -o /dev/null \
|
||||
./mad.sh:3253: -H "Connection: keep-alive" \
|
||||
./mad.sh:3254: -w 'EffectiveUrl=%{url_effective}' \
|
||||
./mad.sh:3255: "$download_url")
|
||||
./mad.sh:3256: else
|
||||
./mad.sh:3257: printf "| Retrieving Head: attempt #$j"
|
||||
./mad.sh:3258: rm -f "${WorkDir}/.temp/directhead"
|
||||
./mad.sh:3259: file_header=$(tor_curl_request --insecure --head -H "Connection: keep-alive" -L -s -i "$download_url" |
|
||||
./mad.sh:3260: tee "${WorkDir}/.temp/directhead" &
|
||||
./mad.sh:3261: sleep 6
|
||||
./mad.sh:3262: [ -s "${WorkDir}/.temp/directhead" ]
|
||||
./mad.sh:3263: kill $! 2>/dev/null
|
||||
./mad.sh:3264: )
|
||||
./mad.sh:3265: if [[ ! -f "${WorkDir}/.flocks/${remote_url//[^a-zA-Z0-9]/}" ]]; then
|
||||
./mad.sh:3266: touch "${WorkDir}/.flocks/${remote_url//[^a-zA-Z0-9]/}"
|
||||
./mad.sh:3267: fi
|
||||
./mad.sh:3268: rm -f "${WorkDir}/.temp/directhead"
|
||||
./mad.sh:3269: fi
|
||||
--
|
||||
./mad.sh:3395: tor_curl_request --insecure -L --referer "$file_url" "$download_url" --output "$file_path"
|
||||
./mad.sh:3396: rc=$?
|
||||
./mad.sh:3397: if ((rc != 0 )) ; then
|
||||
./mad.sh:3398: printf "${RED}Download Failed (bad exit status).${NC}"
|
||||
./mad.sh:3399: if [[ -f ${file_path} ]]; then
|
||||
./mad.sh:3400: printf "${YELLOW} Partial removed...${NC}"
|
||||
./mad.sh:3401: printf "\n\n"
|
||||
./mad.sh:3402: rm -f "${file_path}"
|
||||
./mad.sh:3403: else
|
||||
./mad.sh:3404: printf "\n\n"
|
||||
./mad.sh:3405: fi
|
||||
./mad.sh:3396: tor_curl_request --insecure -L --referer "$file_url" "$download_url" --output "$file_path"
|
||||
./mad.sh:3397: rc=$?
|
||||
./mad.sh:3398: if ((rc != 0 )) ; then
|
||||
./mad.sh:3399: printf "${RED}Download Failed (bad exit status).${NC}"
|
||||
./mad.sh:3400: if [[ -f ${file_path} ]]; then
|
||||
./mad.sh:3401: printf "${YELLOW} Partial removed...${NC}"
|
||||
./mad.sh:3402: printf "\n\n"
|
||||
./mad.sh:3403: rm -f "${file_path}"
|
||||
./mad.sh:3404: else
|
||||
./mad.sh:3405: printf "\n\n"
|
||||
./mad.sh:3406: fi
|
||||
--
|
||||
./mad.sh:3448: tor_curl_request --insecure -L --speed-limit $DownloadSpeedMin --speed-time $DownloadTimeoutInterval "$download_url" --continue-at - --output "$file_path"
|
||||
./mad.sh:3449: else
|
||||
./mad.sh:3450: tor_curl_request --insecure -L --referer "$file_url" "$download_url" --continue-at - --output "$file_path"
|
||||
./mad.sh:3451: fi
|
||||
./mad.sh:3452: received_file_size=0
|
||||
./mad.sh:3453: if [[ -f "$file_path" ]] ; then
|
||||
./mad.sh:3454: received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
|
||||
./mad.sh:3455: fi
|
||||
./mad.sh:3456: if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
|
||||
./mad.sh:3457: containsHtml=false
|
||||
./mad.sh:3458: else
|
||||
./mad.sh:3459: containsHtml=true
|
||||
./mad.sh:3460: fi
|
||||
./mad.sh:3449: tor_curl_request --insecure -L --speed-limit $DownloadSpeedMin --speed-time $DownloadTimeoutInterval "$download_url" --continue-at - --output "$file_path"
|
||||
./mad.sh:3450: else
|
||||
./mad.sh:3451: tor_curl_request --insecure -L --referer "$file_url" "$download_url" --continue-at - --output "$file_path"
|
||||
./mad.sh:3452: fi
|
||||
./mad.sh:3453: received_file_size=0
|
||||
./mad.sh:3454: if [[ -f "$file_path" ]] ; then
|
||||
./mad.sh:3455: received_file_size=$(stat --format="%s" "$file_path" | tr -d '[:space:]')
|
||||
./mad.sh:3456: fi
|
||||
./mad.sh:3457: if CheckNoHtml "$remote_url" "$filename" "$file_path" ; then
|
||||
./mad.sh:3458: containsHtml=false
|
||||
./mad.sh:3459: else
|
||||
./mad.sh:3460: containsHtml=true
|
||||
./mad.sh:3461: fi
|
||||
--
|
||||
./mad.sh:3648: response=$(tor_curl_upload --insecure -i \
|
||||
./mad.sh:3649: -H "Content-Type: multipart/form-data" \
|
||||
./mad.sh:3650: -F "key=" \
|
||||
./mad.sh:3651: -F "time=$jira_timeval" \
|
||||
./mad.sh:3652: -F "file=@${filepath}" \
|
||||
./mad.sh:3653: "${jira_PostUrlHost}")
|
||||
./mad.sh:3654: else
|
||||
./mad.sh:3655: response=$(tor_curl_upload --insecure -i \
|
||||
./mad.sh:3656: -H "Content-Type: multipart/form-data" \
|
||||
./mad.sh:3657: -F "key=" \
|
||||
./mad.sh:3658: -F "time=$jira_timeval" \
|
||||
./mad.sh:3659: -F "files[]=@${arrFiles[@]}" \
|
||||
./mad.sh:3660: "${jira_PostUrlHost}")
|
||||
./mad.sh:3661: fi
|
||||
./mad.sh:3662: if [[ "${DebugAllEnabled}" == "true" ]] ; then
|
||||
./mad.sh:3663: debugHtml "${filepath##*/}" "${_hostCode}_upload" "post_url: ${jira_PostUrlHost}"$'\n'"${response}"
|
||||
./mad.sh:3664: fi
|
||||
./mad.sh:3665: if grep -Eqi ' 200 ' <<< "${response}" ; then
|
||||
./mad.sh:3649: response=$(tor_curl_upload --insecure -i \
|
||||
./mad.sh:3650: -H "Content-Type: multipart/form-data" \
|
||||
./mad.sh:3651: -F "key=" \
|
||||
./mad.sh:3652: -F "time=$jira_timeval" \
|
||||
./mad.sh:3653: -F "file=@${filepath}" \
|
||||
./mad.sh:3654: "${jira_PostUrlHost}")
|
||||
./mad.sh:3655: else
|
||||
./mad.sh:3656: response=$(tor_curl_upload --insecure -i \
|
||||
./mad.sh:3657: -H "Content-Type: multipart/form-data" \
|
||||
./mad.sh:3658: -F "key=" \
|
||||
./mad.sh:3659: -F "time=$jira_timeval" \
|
||||
./mad.sh:3660: -F "files[]=@${arrFiles[@]}" \
|
||||
./mad.sh:3661: "${jira_PostUrlHost}")
|
||||
./mad.sh:3662: fi
|
||||
./mad.sh:3663: if [[ "${DebugAllEnabled}" == "true" ]] ; then
|
||||
./mad.sh:3664: debugHtml "${filepath##*/}" "${_hostCode}_upload" "post_url: ${jira_PostUrlHost}"$'\n'"${response}"
|
||||
./mad.sh:3665: fi
|
||||
./mad.sh:3666: if grep -Eqi ' 200 ' <<< "${response}" ; then
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue