# 2025.02.14 - [up_ranoz] Add help "[rand ext, rename to <filename> or use MAD v2025.02.13+]" to url # 2025.02.14 - [up_uploadhive] Add help "[rand ext, rename to <filename> or use MAD v2025.02.13+]" to url # 2025.02.13 - [mad] Add "RanozRandomizeExt" MAD randomized extension configurable variable # 2025.02.13 - [up_ranoz] Add MAD randomized extension upload handling # 2025.02.13 - [ranoz] Add MAD randomized extension download handling # 2025.02.13 - [sendnow] Extend request timeout for head / get (server response time lag)
31 lines
1.6 KiB
Bash
31 lines
1.6 KiB
Bash
#! Name: uploadbay.sh
|
|
#! Author: kittykat
|
|
#! Version: 2025.02.15
|
|
#! 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='ubay'
|
|
HostNick='uploadbay'
|
|
HostFuncPrefix='direct'
|
|
HostUrls='uploadbay.net'
|
|
HostDomainRegex='^(http|https)://(.*\.)?uploadbay\.net(/|/uploads/)'
|
|
#!
|
|
#! !! 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
|