I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2012-02-10 07:36:16.876418-08 by choppercharles
Cannot connect to metasploit msgpack rpc
On the Metasploit box I execute the following command:

load msgrpc ServerHost=192.168.1.102 ServerPort=55552 Pass=f00bar!

On my linux box, I run this short perl app:
print "Hello World.\n"; my $client = AnyEvent::MPRPC::Client->new( host => '192.168.1.102', port => 55552, ); print "Connected.\n"; my $o = $client->call('auth.login', "msf", "f00bar!"); print "object created.\n"; my $res = $o->recv; print "response received.\n"; print $res; print "\n\n";

I get the following results:
Hello World
Connected.
object created.

Then it hangs.

I've run wireshark to try and troubleshoot, and it appears this is getting sent:

0x94 0x00 0x01 0xA4 echo 0xAA auth.login

Nothing else is getting sent in the packet. msf and f00bar! are not sent. Some ACKs are sent back and forth but it just hangs waiting for a response. What exactly am I doing wrong here? I'm just trying to authenticate and then do a simple sessions.list at the moment.

Thanks.

Charles.
Direct Responses: Write a response