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!
In reply to perl talking to a load balancer by cheddarbastard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |