HEX
Server: Apache
System: Linux vps.rockyroadprinting.net 4.18.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User: rockyroadprintin (1011)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/local/bin/ggpaste
#!/bin/bash

# ggpaste Utility
# @return $paste_url
function ggpaste() {
    if [ ! -z $2 ]
                then
        curl --header "GGAUTH: ggpaste_07082022" --form t=$1 --form file=@$2 https://paste.websitehostserver.net/vps/vps_paste.php
                else
        curl --header "GGAUTH: ggpaste_07082022" --form t=$1 --form file=@- https://paste.websitehostserver.net/vps/vps_paste.php
        fi
}


# Validate input
if [ -z $1 ]
        then
        # Show error and examples
                echo "ggpaste Failed - No content pasted"
                echo ""
                echo "ggpaste usage:"
                echo "Example 1(paste a file): ggpaste [paste-name] [/path/to/file]"
                echo "Example 2(paste output): ps aux|grep user|ggpaste [paste-name]"
                exit
        else
                # Paste content to server
                ggpaste $1 $2
                exit
fi