cheddarbastard has asked for the wisdom of the Perl Monks concerning the following question:
I'm still quite new to perl, so my form is a bit off, but I'm trying to write a script that will talk to a Foundry ServerIron load balancer. I'm trying to do this with IO:Socket:INET, and I'm running into some issues. Here's the test script I'm using to see if I can get the script and the load balancer talking:
use IO::Socket; <P> my $userpass=password; my $enapass=drowssap; + my @list=("$userpass", "ena", "$enapass", "show server virtual", "exit +", "exit"); + my $foundry = new IO::Socket::INET ("loadbalancer:23") or die "Couldn't connect to loadbalancer!!!: $@"; + foreach $item (@list){ print $foundry "$item\n"; my $response = <$foundry>; print $response; } + exit 1;
Cheesey, but I'll do nicer stuff once I know I can get this going. Anyway, when I run the script, my output is a line of garbage characters, then "User Access Verification", which is what I expect to see, then it sits until I break out of the script.
For right now at least, I just want it to connect to the lb on the telnet port, give it the access password, enable, give the admin password, "show server virtual," then log off. Any ideas?
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl talking to a load balancer
by c-era (Curate) on Jan 26, 2001 at 02:16 UTC | |
|
Re: perl talking to a load balancer
by clintp (Curate) on Jan 26, 2001 at 02:59 UTC |