Linux business72.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
LiteSpeed
: 162.0.229.97 | : 3.147.77.245
Cant Read [ /etc/named.conf ]
8.1.30
temmmp
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
lib64 /
nagios /
plugins /
nccustom /
[ HOME SHELL ]
Name
Size
Permission
Action
authorized_users.list
143
B
-rw-r-----
check-autobackup.sh
6.68
KB
-rwxr-xr-x
check-cagefs-status.sh
2.04
KB
-rwxr-xr-x
check-cpanel-update.sh
1.85
KB
-rwxr-xr-x
check-litespeed-version.sh
2.87
KB
-rwxr-xr-x
check-lscache-version.sh
3.84
KB
-rwxr-xr-x
check-mail-filter-avlb.sh
2.18
KB
-rwxr-xr-x
check-outmailip-rbl.py
3.99
KB
-rwxr-xr-x
check-rpmdb-integrity.sh
1.63
KB
-rwxr-xr-x
check-unexpected-systemd-servi...
8.07
KB
-rwxr-xr-x
check_backup.sh
6.35
KB
-rwxr-xr-x
check_cl_license
950
B
-rwxr-xr-x
check_cplicense.sh
268
B
-rwxr-xr-x
check_cpshell
949
B
-rwxr-xr-x
check_csf
3.72
KB
-rwxr-xr-x
check_cwaf.sh
2.44
KB
-rwxr-xr-x
check_execve_filter.list
370
B
-rw-r-----
check_execve_privileges.sh
2.51
KB
-rwxr-x---
check_eximq.sh
3.16
KB
-rwxr-xr-x
check_extra_accts.py
4.18
KB
-rwxr-xr-x
check_http_full_stack.conf
144
B
-rw-r--r--
check_http_full_stack.py
4.3
KB
-rwxr-xr-x
check_if_ips.py
4.15
KB
-rwxr-xr-x
check_if_ips_tcp.py
4.71
KB
-rwxr-xr-x
check_ip_update_log.sh
540
B
-rwxr-xr-x
check_ip_usage.py
6.67
KB
-rwxr-xr-x
check_kernelcare.sh
2.13
KB
-rwxr-xr-x
check_lfd_logs.conf
471
B
-rw-r--r--
check_logfiles.conf
595
B
-rw-r--r--
check_logfiles.pl
206.82
KB
-rwxr-xr-x
check_logfiles_innodbcounter.c...
1002
B
-rw-r--r--
check_mailip.py
3.83
KB
-rwxr-xr-x
check_mem.pl
12.85
KB
-rwxr-xr-x
check_mysqld_msize.sh
666
B
-rwxr-xr-x
check_nc_cp_backup_process.sh
8.75
KB
-rwxr-xr-x
check_ncsslplugin.py
1.89
KB
-rwxr-xr-x
check_ntp_client
11.78
KB
-rwxr-xr-x
check_openport.sh
7.59
KB
-rwxr-xr-x
check_pem_worker.pl
929
B
-rwxr-xr-x
check_pgactivity
294.21
KB
-rwxr-xr-x
check_plans.py
7.59
KB
-rwxr-xr-x
check_puppet
16.14
KB
-rwxr-xr-x
check_quota_on.sh
902
B
-rwxr-xr-x
check_ro_fs.py
3.43
KB
-rwxr-xr-x
check_service.sh
9.34
KB
-rwxr-xr-x
check_software_updates
31.68
KB
-rwxr-xr-x
check_spamd
6.7
KB
-rwxr-xr-x
check_stalled_procs.py
4.42
KB
-rwxr-xr-x
check_suid_status.sh
295
B
-rwxr-xr-x
check_suspicious_files_status....
1.42
KB
-rwxr-xr-x
check_unauthorized_user.sh
17.16
KB
-rwxr-xr-x
replcheck_param.pl
5.48
KB
-rwxr-xr-x
systemd_scopes_whitelist
10
B
-rw-r--r--
systemd_services_folders
70
B
-rw-r--r--
systemd_services_whitelist
6.67
KB
-rw-r-----
systemd_targets_whitelist
12
B
-rw-r--r--
test.eml
3.26
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : check-autobackup.sh
#!/bin/bash ################################################ # script for NC cPanel autobackup monitoring # # # # Created by Bogdan Kukharskiy # # Namecheap # ################################################ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin verbose=0 targetstr="/backup" agetreshold=172800 # 48 hours ratiotreshold=$(printf "%.2f\n" 0.20) snapagetresholdoverride="" PROGNAME=${0##*/} fstype="nfs" emrgstr="nfs/$(hostname -s)" #green='\033[0;32m' #yellow='\033[1;33m' #red='\033[0;31m' #NC='\033[0m' # No Color print_usage() { echo "" echo "Usage: $PROGNAME [-v be Verbose] [-t Target mount string to check] [-a critical Age for emergency backup partition mount ] [-r failed/success Ratio] [-s Snapshot age treshold override]" echo "Usage: $PROGNAME --help" } print_help() { print_usage echo "" echo "This script runs different checks on NC cPanel Autobackup (see TO-17214)" echo "" echo "-v be Verbose (should be last argument)" echo "-t Target mount string to check, string. Default - /backup" echo "-a critical Age for emergency backup partition mount, seconds. Default - 172800 (48 hours)" echo "-r failed/success Ratio, float. Default - 0.20" echo "-s Snapshot age treshold override, seconds, Default, for regular and resellers - 302400 (84 hours)" echo " for business and premium - 129600 (36 hours)" echo "--help Print this help screen" echo "" exit 3 } while [ $# -gt 0 ]; do case "$1" in --help) print_help exit 3 ;; -h) print_help exit 3 ;; -t) targetstr=$2; shift ;; -a) agetreshold=$2; shift ;; -r) r=$2; ratiotreshold=$(printf "%.2f\n" "$r"); shift ;; -s) snapagetresholdoverride=$2; shift ;; -v) verbose=1; shift;shift ;; *) echo >&2 "Unknown argument: $1" print_usage exit 3 ;; esac shift done # lets check if emergency partition is mounted if [[ ${verbose} == 1 ]]; then echo -e "1. Checking if the emergency partition is mounted" fi emrgchkres=$( findmnt -rno SOURCE "/backup" -t ${fstype} 2>/dev/null ) if [[ ${emrgchkres} != *"${emrgstr}"* ]]; then if [[ ${verbose} == 1 ]]; then echo "Emergency partition is mounted: ${emrgchkres}"; # Then let's check the age of emergency backup partition age=$( grep -A2 /backup /proc/self/mountstats | grep "age" | cut -d":" -f2 | tr -d '[:space:]' ) if [[ ${verbose} == 1 ]]; then echo -e "1.1. Checking the age of emergency backup partition" echo " Age of ${emrgchkres} : ${age} sec ($((age / 3600)) hours)" fi if [[ ${age} -lt ${agetreshold} ]]; then if [[ ${verbose} == 1 ]]; then echo -e "Emergency partition age is OK"; fi else echo -e "Emergency partition age > $((agetreshold / 3600)) hours ($((age / 3600)) hours)"; exit 2 fi fi else if [[ ${verbose} == 1 ]]; then echo -e "OK. Emergency partition is not mounted"; fi fi # find /backup and compare with fstab sourcestr="$(grep "/backup" /etc/fstab | grep -v "#" | awk '{ print $1 }')" mntchkres=$( findmnt -rno SOURCE "${targetstr}" -t ${fstype} 2>/dev/null ) if [ "${mntchkres: -1}" == "/" ]; then # remove last / if presents mntchkres="${mntchkres%?}" fi if [[ ${verbose} == 1 ]]; then echo -e "2. Checking mountpoint ${targetstr} of fstype ${fstype} " echo " Source string from /etc/fstab : ${sourcestr}" echo " Findmnt results : ${mntchkres}" fi if [[ "${mntchkres}" == "${sourcestr}" ]]; then if [[ ${verbose} == 1 ]]; then echo -e "OK. Mountpoint ${targetstr} is mounted according to fstab"; fi else echo -e "Mountpoint ${targetstr} is not mounted"; exit 2 fi # testing connection to HAPI and rsync if [[ ${verbose} == 1 ]]; then echo -e "3. Testing connection to HAPI and rsync (with /root/bin/nc_cp_backup_with_snapshot.sh --test)" fi tstchkres=$( /root/bin/nc_cp_backup_with_snapshot.sh --test ) if [[ ${tstchkres} == *"Connection to HAPI: test OK"* ]] && [[ ${tstchkres} == *"Connection to rsync: test OK"* ]] ; then if [[ ${verbose} == 1 ]]; then echo -e "OK"; echo "${tstchkres}"; fi else echo -e "Connection to HAPI or rsync failed"; echo "${tstchkres}"; exit 2 fi # Checking snapshot freshness if [[ ${verbose} == 1 ]]; then echo -e "4. Checking snapshot freshness (via log at /var/log/nc_audit/nc_cp_backup.log)" fi if [ -z "${snapagetresholdoverride}" ]; then if [[ $(hostname -s) == *"business"* ]] || [[ $(hostname -s) == *"premium"* ]] ; then snapagetreshold=129600 # 36 hours else snapagetreshold=302400 # 84 hours fi else snapagetreshold=${snapagetresholdoverride} fi rawsnapshotage=$( grep -B 1 "snapshot creation api has been triggered" /var/log/nc_audit/nc_cp_backup.log | tail -1 | awk '{print$1" "$2" "$3}' ) snapshotage=$( date -d"${rawsnapshotage}" +%s) snapdiff=$(($(date +%s) - snapshotage)) if [[ ${snapdiff} -lt ${snapagetreshold} ]]; then if [[ ${verbose} == 1 ]]; then echo -e "OK. Snapshot is fresh (created at ${rawsnapshotage})"; fi else echo -e "Snapshot was created more than $((snapagetreshold / 3600)) hours ago ($((snapdiff / 3600)))"; exit 2 fi # Checking success/failed ratio (should be less than 0.2%) if [[ ${verbose} == 1 ]]; then echo -e "5. Checking the success/failed ratio of backed up accounts" fi ratiores=$( grep -B 1 "snapshot creation api has been triggered" /var/log/nc_audit/nc_cp_backup.log | tail -2 | grep "failed:" ) if [[ ${#ratiores} -gt 0 ]]; then if [[ ${verbose} == 1 ]]; then echo "Failed accounts found. Calculating the ratio"; fi totalacc=$( echo "${ratiores}" | awk '{print$11}' ) failedacc=$( echo "${ratiores}" | awk '{print$16}' ) ratio=$( awk -v f="${failedacc}" -v t="${totalacc}" 'BEGIN {print 100*f/t}' ) if (( $( echo "${ratio} > ${ratiotreshold}" | bc -l ) )); then echo -e "Failed ratio is more than treshold (${ratio} > ${ratiotreshold}, failed ${failedacc} from ${totalacc}) "; exit 2 else if [[ ${verbose} == 1 ]]; then echo "Mmm..OK. Failed ratio is not more than treshold (${ratio} < ${ratiotreshold}, failed ${failedacc} from ${totalacc})"; fi fi else if [[ ${verbose} == 1 ]]; then echo -e "OK. No failed accounts. Success ratio - 100% "; fi fi echo "All OK"
Close