blob: 3bdd2e5192fbf5d0b90c9bc0b44ef550c6fbfea7 (
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;
|