daily pastebin goal
26%
SHARE
TWEET

tcptest.pl

ExaGridDba Jul 18th, 2013 86 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. #!/usr/bin/perl
  2.  
  3. # tcptest.pl
  4. # Brian Fitzgerald
  5. # 7/17/2013
  6. # brian@exagriddba.com
  7.  
  8. use warnings;
  9. use strict;
  10. use IO::Socket::INET;
  11.  
  12. if ( @ARGV != 2 )
  13. {
  14.         die "usage: $0 host port";
  15. }
  16.  
  17. my ( $host, $port ) = @ARGV;
  18.  
  19. my $socket = new IO::Socket::INET (
  20.         PeerHost => $host,
  21.         PeerPort => $port,
  22.         Proto => 'tcp',
  23. ) or die "Connect $host:$port $!";
  24.  
  25. print "connected to $host:$port\n";
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top