I’m working on a Perl script to connect to my openfire server and something as simple as this fails. I’d like to test this using telnet commands to see what I’m getting back from the server but I can’t seem to even get past the initial telnet command from here on the forums. Can anyone supply me with some basic telnet commands for starting the stream, authenticating and getting the roster? All results I’ve been able to find from google are failing.
For anyone familiar with Net::Jabber I’ve attached an explanation of what’s happening with the perl code below:
I’ve replaced my servers hostname and IP as it’s private but this is basically what’s going on:
root@iball:/home/relapse# cat test2.pl
#!/usr/bin/perl
use Net::Jabber;
use constant SERVER => ‘myserverishere’;
use constant PORT => 5222;
my $connection = Net::Jabber::Client->new();
$connection->Connect( “hostname” => SERVER,
“port” => PORT
)
or die “Cannot connect ($!)\n”;
root@iball:/home/relapse#
root@iball:/home/relapse# ./test2.pl
Cannot connect ()
root@iball:/home/relapse# telnet myserver 5222
Trying xxx.xxx.xxx.xxx…
Connected to myserver.
Escape character is ‘^]’.