p!ranha?
Server IP : 103.169.32.36  /  Your IP : 216.73.217.13
Web Server : Apache
System : Linux web.dpmptsp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /opt/eset/efs/sbin/

Upload File :
Curr3nt_D!r [ Writeable ] D0cum3nt_r0Ot [ Writeable ]

 
Command :
Current File : /opt/eset/efs/sbin/ecp_logging.sh
#!/bin/sh

#set -ex

# This script should be run on customer system to enable ecp logging (activation) for support purpose only.

help() {
	echo 'This is an script used to enable ecp logging for support purpose only.'
	echo
	echo 'Usage:'
	printf "\t%s \n" "$0"
	printf "\t%s -h\n" "$0"
	printf "\t%s -e [-f]\n" "$0"
	printf "\t%s -d [-f]\n" "$0"
	echo
	echo 'Options:'
	printf "\t-h, --help\n\t\tShow this command-line arguments help\n"
	printf "\t-e, --enable\n\t\tEnable ecp logging\n"
	printf "\t-d, --disable\n\t\tDisable ecp logging\n"
	printf "\t-f, --force\n\t\tRestart product without asking\n"
}

FORCE=0
NEED_RESTART=0

for arg in "$@"; do
	case "$arg" in
		-h|--help) help 1>&2; exit 0;;
		-e|--enable) ENABLE=1;;
		-d|--disable) ENABLE=0;;
		-f|--force) FORCE=1;;
		*) echo "ERROR: Unrecognized command-line option '$arg'" 1>&2; exit 2;;
	esac
done

# Print help as default action
if [ -z "${ENABLE}" ]; then
	help 1>&2;
	exit 0;
fi

# Must be run under root user.
if [ "$(id -u)" -ne 0 ]; then
	echo "ERROR: You must run this script as root." >&2
	exit 1
fi

# Find security product
if [ -f "/opt/eset/eea/etc/pkgid" ]; then
	PRODUCT="eea"
elif [ -f "/opt/eset/efs/etc/pkgid" ]; then
	PRODUCT="efs"
else
	echo "ERROR: Security product not found." >&2
	exit 1
fi

INSTALL_PATH="/opt/eset/${PRODUCT}"
LICENSE_VAR_PATH="/var${INSTALL_PATH}/licensed"
LOGS_PATH="${LICENSE_VAR_PATH}/ecp"
CFG_FILE_MASK="license_cfg*.json"

if ps -ef | grep "${INSTALL_PATH}" | grep -v grep >/dev/null ; then
	NEED_RESTART=1
fi

if [ "${NEED_RESTART}" -eq 1 ]; then
	if [ "${FORCE}" -eq 0 ]; then
		printf 'WARNING: Product will be restarted. Do you want to continue? (y/n) '
		read -r r
		case $r in
			[Yy]|[Yy][Ee][Ss]) ;;
			*)	echo 'ERROR: Logging cannot be enabled/disabled without restating product. '
				exit 1;;
		esac
	fi

	if systemctl --version >/dev/null 2>/dev/null; then
		systemctl stop "${PRODUCT}" 2> /dev/null
	else
		echo "ERROR: systemctl not present on system, please stop product manually." 1>&2
		exit 1
	fi
fi

if [ "${ENABLE}" -eq 1 ]; then
	find "${LICENSE_VAR_PATH}" -name "${CFG_FILE_MASK}" -type f -execdir sed -i 's/"Logging"[ \t]*:[ \t]*false/"Logging":true/g' "{}" +
	echo "Logging enabled."
	echo "Logs will be collected here: ${LOGS_PATH}"
else
	find "${LICENSE_VAR_PATH}" -name "${CFG_FILE_MASK}" -type f -execdir sed -i 's/"Logging"[ \t]*:[ \t]*true/"Logging":false/g' "{}" +
	echo "Logging disabled."
fi

if [ "${NEED_RESTART}" -eq 1 ]; then
	if systemctl --version >/dev/null 2>/dev/null; then
		systemctl start "${PRODUCT}" 2> /dev/null
	fi
fi
N4m3
5!z3
L45t M0d!f!3d
0wn3r / Gr0up
P3Rm!55!0n5
0pt!0n5
..
--
March 05 2025 05:58:57
0 / 0
0755
cls
--
March 05 2025 05:58:58
0 / 0
0755
cfg
87.234 KB
July 26 2024 11:16:52
0 / 0
0755
cloud
67 KB
July 26 2024 11:16:52
0 / 0
0755
collect_logs.sh
14.594 KB
July 26 2024 11:16:52
0 / 0
0755
ecp_logging.sh
2.516 KB
July 26 2024 11:16:52
0 / 0
0755
lic
71.07 KB
July 26 2024 11:16:52
0 / 0
0755
setgui
79.141 KB
July 26 2024 11:16:52
0 / 0
0755
startd
344.305 KB
July 26 2024 11:16:52
0 / 0
0755