!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)

/usr/libexec/netdata/plugins.d/   drwxr-xr-x
Free 13.25 GB of 57.97 GB (22.85%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     charts.d.dryrun-helper.sh (1.23 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-or-later

# shellcheck disable=SC2181

# will stop the script for any error
set -e

me="$0"
name="$1"
chart="$2"
conf="$3"

can_diff=1

tmp1="$(mktemp)"
tmp2="$(mktemp)"

myset() {
	set | grep -v "^_=" | grep -v "^PIPESTATUS=" | grep -v "^BASH_LINENO="
}

# save 2 'set'
myset >"$tmp1"
myset >"$tmp2"

# make sure they don't differ
diff "$tmp1" "$tmp2" >/dev/null 2>&1
if [ $? -ne 0 ]; then
	# they differ, we cannot do the check
	echo >&2 "$me: cannot check with diff."
	can_diff=0
fi

# do it again, now including the script
myset >"$tmp1"

# include the plugin and its config
if [ -f "$conf" ]; then
	# shellcheck source=/dev/null
	. "$conf"
	if [ $? -ne 0 ]; then
		echo >&2 "$me: cannot load config file $conf"
		rm "$tmp1" "$tmp2"
		exit 1
	fi
fi

# shellcheck source=/dev/null
. "$chart"
if [ $? -ne 0 ]; then
	echo >&2 "$me: cannot load chart file $chart"
	rm "$tmp1" "$tmp2"
	exit 1
fi

# remove all variables starting with the plugin name
myset | grep -v "^$name" >"$tmp2"

if [ $can_diff -eq 1 ]; then
	# check if they are different
	# make sure they don't differ
	diff "$tmp1" "$tmp2" >&2
	if [ $? -ne 0 ]; then
		# they differ
		rm "$tmp1" "$tmp2"
		exit 1
	fi
fi

rm "$tmp1" "$tmp2"
exit 0

:: 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.0042 ]--