!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/netdata/tests/installer/   drwxr-xr-x
Free 13.06 GB of 57.97 GB (22.53%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     slack.sh (1.95 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# #No shebang necessary
# BASH Lib: Simple incoming webhook for slack integration.
#
# The script expects the following parameters to be defined by the upper layer:
# SLACK_NOTIFY_WEBHOOK_URL
# SLACK_BOT_NAME
# SLACK_CHANNEL
#
# Copyright:
#
# Author: Pavlos Emm. Katsoulakis <paul@netdata.cloud

post_message() {
	TYPE="$1"
	MESSAGE="$2"
	CUSTOM_CHANNEL="$3"

	case "$TYPE" in
		"PLAIN_MESSAGE")
			curl -X POST --data-urlencode "payload={\"channel\": \"${SLACK_CHANNEL}\", \"username\": \"${SLACK_BOT_NAME}\", \"text\": \"${MESSAGE}\", \"icon_emoji\": \":space_invader:\"}" "${SLACK_NOTIFY_WEBHOOK_URL}"
			;;
		"TRAVIS_MESSAGE")
			if [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ] || [ "${TRAVIS_BRANCH}" != "master" ] ; then
				echo "Skipping notification due to build type."
				return 0
			fi

			if [ -n "${CUSTOM_CHANNEL}" ]; then
				echo "Sending travis message to custom channel ${CUSTOM_CHANNEL}"
				OPTIONAL_CHANNEL_INFO="\"channel\": \"${CUSTOM_CHANNEL}\","
			fi

			POST_MESSAGE="{
				${OPTIONAL_CHANNEL_INFO}
				\"text\": \"${TRAVIS_REPO_SLUG}, ${MESSAGE}\",
				\"attachments\": [{
				    \"text\": \"${TRAVIS_JOB_NUMBER}: Event type '${TRAVIS_EVENT_TYPE}', on '${TRAVIS_OS_NAME}' \",
				    \"fallback\": \"I could not determine the build\",
				    \"callback_id\": \"\",
				    \"color\": \"#3AA3E3\",
				    \"attachment_type\": \"default\",
				    \"actions\": [
					{
					    \"name\": \"${TRAVIS_BUILD_NUMBER}\",
					    \"text\": \"Build #${TRAVIS_BUILD_NUMBER}\",
					    \"type\": \"button\",
					    \"url\": \"${TRAVIS_BUILD_WEB_URL}\"
					},
					{
					    \"name\": \"${TRAVIS_JOB_NUMBER}\",
					    \"text\": \"Job #${TRAVIS_JOB_NUMBER}\",
					    \"type\": \"button\",
					    \"url\": \"${TRAVIS_JOB_WEB_URL}\"
					}]
				}]
			}"
			echo "Sending ${POST_MESSAGE}"
			curl -X POST --data-urlencode "payload=${POST_MESSAGE}" "${SLACK_NOTIFY_WEBHOOK_URL}"
			;;
		*)
			echo "Unrecognized message type \"$TYPE\" was given"
			return 1
			;;
	esac
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0055 ]--