blob: efe4de0aa616e3a56c558de7bcd96d140533e25f (
plain)
- #!/usr/bin/perl
- ( $host, $proto, $port ) = @ARGV;
- socket( SOCK, 2, 1, getprotobynumber($proto) );
- $dest = pack( 's n a4 x8', 2, $port, pack( 'CCCC', split( /\./, $host ) ) );
- connect( SOCK, $dest );
- open( 'STD', '-' );
- while ( $line = <STD> ) {
- print SOCK $line;
- }
- close STD;
- close SOCK;
|