diff options
author | Nicholas Vinson <nvinson234@gmail.com> | 2020-10-23 21:45:56 -0400 |
---|---|---|
committer | Rasmus Thomsen <oss@cogitri.dev> | 2021-02-19 09:31:23 +0100 |
commit | 6d44493b989aad3ec5e2189029be992aa03e7541 (patch) | |
tree | 30c3664719a4373e3f294e82483f11ada847f783 | |
parent | a933682a5b9b71be0c6b9a6a5f9b0c39b0f69431 (diff) | |
download | wgetpaste-6d44493b989aad3ec5e2189029be992aa03e7541.tar.gz |
Add 0x0 pastebin
-rwxr-xr-x | wgetpaste | 23 |
1 files changed, 21 insertions, 2 deletions
@@ -41,7 +41,11 @@ POST_generic() { } ### services -SERVICES="bpaste codepad dpaste gists ix_io snippets" +SERVICES="0x0 bpaste codepad dpaste gists ix_io snippets" +# 0x0 +ENGINE_0x0=0x0 +URL_0x0="http://0x0.st" +SIZE_0x0="536870912 536%MB" # bpaste ENGINE_bpaste=pinnwand URL_bpaste="https://bpaste.net/" @@ -74,8 +78,23 @@ URL_snippets="https://gitlab.com/api/v4/snippets" ADDITIONAL_HEADERS_snippets=("Content-Type: application/json") ### engines -# codepad +# 0x0 +escape_description_0x0() { echo "$*"; } +escape_input_0x0() { echo "$*"; } +POST_0x0() { + local filename="${2}" + local content="${6}" boundary="WGETPASTE-yuLr+iHOSQ+trEgDcj9UVq5R302bid" + echo "--$boundary" + echo "Content-Disposition: form-data; name=\"file\"; filename=\"${filename}\"" + echo "" + echo "${content}" + echo "--${boundary}--" + ADDITIONAL_HEADERS_0x0=("Content-Type: multipart/form-data; boundary=${boundary}") +} +REGEX_RAW_0x0='s|^http.*|\0|' +REGEX_URL_0x0='s|^http.*|\0|p' LANGUAGES_codepad="C C++ D Haskell Lua OCaml PHP Perl Plain%Text Python Ruby Scheme Tcl" +# codepad POST_codepad() { POST_generic "submit % % lang % % code" "$1" "$2" "$3" "$4" "$5" "$6" } |