Answer the question
In order to leave comments, you need to log in
Jabber client Net::XMPP stopped working with google
I had a jabber bot that worked for many years until yesterday.
And yesterday the chick stopped.
Here is the code:
#!/usr/bin/perl
use Net::XMPP;
use strict;
my $conn = Net::XMPP::Client->new;
my $status = $conn->Connect(
hostname => 'talk.google.com',
port => 5222,
componentname => 'mydomen.com',
connectiontype => 'tcpip',
tls => 1,
);
unless ( defined $status ){
die "Connection failed: $!";
}
my @result = $conn->AuthSend( username => 'my_login', password => 'my_pass', resource => 'ya_hz');
if ($result[0] not "ok") {
exit(0);
}
# Send message
$conn->MessageSend(to => '[email protected]', body => 'test', resource => '
Answer the question
In order to leave comments, you need to log in
# Here is the solution to this problem. Paste inside a non-working program.
use IO::Socket::SSL;
{
no warnings 'redefine';
my $old_connect_SSL = \&IO::Socket::SSL::connect_SSL;
*IO::Socket::SSL::connect_SSL = sub {
my $sock = $_[0];
${*$sock}{_SSL_arguments}{SSL_cipher_list} = 'RC4-MD5';
goto $old_connect_SSL;
};
}
I observed the same problem yesterday, but today everything is working fine, it looks like some kind of internal work.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question