tech:remplacer_telnet_nc_sous_linux
Table des matières
Remplacer Telnet / nc sous linux
Bash - Remplacer Telnet / nc (netcat) par /dev/tcp
Lire
cat < /dev/tcp/127.0.0.1/22
Tester la connexion
echo > /dev/tcp/127.0.0.1/22
exec 3<>/dev/tcp/www.google.com/80 echo -e "GET / HTTP/1.1\r\nhost: http://www.google.com\r\nConnection: close\r\n\r\n" >&3 cat <&3 exec 3>&-
timeout 1 bash -c " echo > /dev/tcp/${HOST}/${PORT} " > /dev/null 2>&1 && echo "Port ${PORT} is open" || echo "Port ${PORT} is closed"
Avec curl
Ou encore
curl -v telnet://127.0.0.1:22
tech/remplacer_telnet_nc_sous_linux.txt · Dernière modification : de 127.0.0.1
