Full Disclosure mailing list archives
Re: Unix Commands
From: Jeffrey Denton <dentonj () gmail com>
Date: Tue, 17 Aug 2004 10:08:45 -0700
On Sat, 14 Aug 2004 07:07:05 -0700, Seth Alan Woolley <seth () tautology org> wrote:
Bash supports sockets directly. Read the man page under redirection: /dev/tcp/host/port If host is a valid hostname or Internet address, and port is an integer port number or service name, bash attempts to open a TCP connection to the corresponding socket. /dev/udp/host/port If host is a valid hostname or Internet address, and port is an integer port number or service name, bash attempts to open a UDP connection to the corresponding socket.
http://www.tldp.org/LDP/abs/html/devref1.html An example from that page: $ exec 5<>/dev/tcp/www.slashdot.org/80 $ echo -e "GET / HTTP/1.0\n" >&5 $ cat <&5 HTTP/1.1 301 Moved Permanently Date: Tue, 17 Aug 2004 17:04:28 GMT Server: Apache/1.3.29 (Unix) mod_gzip/1.3.26.1a mod_perl/1.29 Location: http://slashdot.org/ Connection: close Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <HTML><HEAD> <TITLE>301 Moved Permanently</TITLE> </HEAD><BODY> <H1>Moved Permanently</H1> The document has moved <A HREF="http://slashdot.org/">here</A>.<P> <HR> <ADDRESS>Apache/1.3.29 Server at www.slashdot.org Port 8080</ADDRESS> </BODY></HTML> netcat is still a better answer. _______________________________________________ Full-Disclosure - We believe in it. Charter: http://lists.netsys.com/full-disclosure-charter.html
Current thread:
- Unix Commands IndianZ (Aug 14)
- Re: Unix Commands Jan Muenther (Aug 14)
- Re: Unix Commands kf_lists (Aug 14)
- Re: Unix Commands Seth Alan Woolley (Aug 14)
- Re: Unix Commands Jeffrey Denton (Aug 17)
- RE: Unix Commands Aditya, ALD [Aditya Lalit Deshmukh] (Aug 15)