Archive for March 2011
Shell allow users to send udp or tcp messages to the remote host and to receive replies directly from the command line without any additional tools. It seems like a quite useful thing, but the functionality are limited to act only as a tcp/udp client, and not as a server.
The whole following code shows how to exploit this functionality. It should works properly in both major shell interpretors: Bash and Ksh.
exec 3<> /dev/tcp/$host_name/$port_number Read the rest of this entry »
echo -e "GET / HTTP/1.0\nHost: $host_name\n\n" >&3
while true ;do
read -r response <&3
if [ -z "$response" ];then