U
usaims
Hello,
I need to test if a remote server has a port open. I do not want to
write to it (the developer won't let me write to it), just verify if it
is open. The script below kind of does what I need but it hangs after I
execute it. Can sombody suggest a better solution?
#!/usr/bin/perl -w
use strict;
use IO::Socket::INET;
my $sock = IO::Socket::INET->new(PeerAddr => '10.124.251.25',
PeerPort => '1234',
Proto => 'tcp',
) or die "$!";
print while <$sock>;
usaims
I need to test if a remote server has a port open. I do not want to
write to it (the developer won't let me write to it), just verify if it
is open. The script below kind of does what I need but it hangs after I
execute it. Can sombody suggest a better solution?
#!/usr/bin/perl -w
use strict;
use IO::Socket::INET;
my $sock = IO::Socket::INET->new(PeerAddr => '10.124.251.25',
PeerPort => '1234',
Proto => 'tcp',
) or die "$!";
print while <$sock>;
usaims