Openfire telnet commands

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 ‘^]’.

Nevermind, I was able to debug the xml challenge/response and accomplish my overall goal using raw sockets in perl. If anyone has questions about it please feel free to e-mail me here: patrick at scriptninja.org

Hi Patrick,

Would you be able to post your solution here in the thread? I haven’t delved into using perl to connect to the server yet but I am planning on doing so in the future and making it searchable here in the forum could save me from having to troubleshoot a similar issue should I encounter it.

Thanks!