Skip to content

Instantly share code, notes, and snippets.

@mwicat
Created March 18, 2021 09:25
Show Gist options
  • Select an option

  • Save mwicat/625125ac6dfedf635dba2e4d151dbaa8 to your computer and use it in GitHub Desktop.

Select an option

Save mwicat/625125ac6dfedf635dba2e4d151dbaa8 to your computer and use it in GitHub Desktop.
perl -e '
use IO::Socket;
my $addr = $ARGV[0];
my $port = $ARGV[1];
print("Connecting...\n");
$socket = IO::Socket::INET->new(PeerAddr => $addr , PeerPort => $port , Proto => 'tcp' , Timeout => 1)
or die "Could not connect to $remote_host:$remote_port : $@\n";
print("Connected\n");
' www.google.com 443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment