1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2025-02-05 07:43:22 -08:00

add support for litterbox to notice

This commit is contained in:
Connor Olding 2024-07-06 17:15:17 -07:00
parent 901285c28a
commit 6d59fb2e74

View file

@ -214,6 +214,25 @@ __notice_upload_to_sh_envs() {
normal="$raw/${1##*/}" normal="$raw/${1##*/}"
} }
__notice_upload_to_moe_catbox_litterbox() {
# defaults: 1 hour, permanent
# configured: 3 days, permanent
# filenames are randomized. cannot manually delete nor specify expiry.
# SUPER fast. disallowed filetypes: .exe, .scr, .cpl, .doc*, .jar
__notice_compute_form_limit "fileToUpload" "${1##*/}" "${bytes:-0}" 1000000000 || return 128
target=litterbox.catbox.moe
if [ "${1%.exe}" != "$1" ] || [ "${1%.scr}" != "$1" ]; then
set -- "$1" "fileToUpload=@$1;filename=${1%.???}.com" # bypass
elif [ "${1%.cpl}" != "$1" ]; then
set -- "$1" "fileToUpload=@$1;filename=${1%.???}.dll" # bypass
else
set -- "$1" "fileToUpload=@$1"
fi
raw="$(__notice_curl -fF "$2" -Ftime=72h -Freqtype=fileupload "https://$target/resources/internals/api.php")" || return
normal="$raw"
aux="$normal"
}
__notice_retrying() { __notice_retrying() {
case $? in case $? in
(0) return 0;; (0) return 0;;
@ -265,10 +284,11 @@ __notice_upload() {
REPLY= REPLY=
__notice_upload_to_sh_envs "$file" || __notice_retrying || \ __notice_upload_to_sh_envs "$file" || __notice_retrying || \
__notice_upload_to_net_filebin "$file" || __notice_retrying || \
__notice_upload_to_at_oshi "$file" || __notice_retrying || \ __notice_upload_to_at_oshi "$file" || __notice_retrying || \
__notice_upload_to_net_filebin "$file" || __notice_retrying || \
__notice_upload_to_org_c_net_paste "$file" || __notice_retrying || \ __notice_upload_to_org_c_net_paste "$file" || __notice_retrying || \
__notice_upload_to_io_file "$file" || __notice_retrying || \ __notice_upload_to_io_file "$file" || __notice_retrying || \
__notice_upload_to_moe_catbox_litterbox "$file" || __notice_retrying || \
__notice_upload_to_com_bashupload "$file" || __notice_retrying || \ __notice_upload_to_com_bashupload "$file" || __notice_retrying || \
{ {
__notice_warn "failed to upload to every service, exiting." __notice_warn "failed to upload to every service, exiting."