Bus error on https get request



I have this script:


use strict;
use utf8;
use encoding 'utf-8';
use Encode qw(encode);
use LWP::UserAgent;
use Getopt::Long;
use URI::Escape;
use HTML::Form;
use Crypt::SSLeay;
use Net::HTTPS;


sub tim_login
# Effettua il login, preoccupandosi di verificare se questo Ë
# avvenuto con successo o meno. In caso affermativo, ritorna l'oggetto
# LWP::UserAgent creato.

my ($user, $pass) = @_;
my $res;
$ua = LWP::UserAgent->new();
$ua->cookie_jar({ file => $cookie_file });

$res = $ua->get('http://www.tim.it/');
#print $res->content;
my @form = HTML::Form->parse($res);

local $^W = 0;
$form[1]->value('password', '12345678');

$res = $ua->request($form[1]->click);

if ( $res->is_success )
return $ua
if ($res->content =~ /timn_post_autenticazione/);

print "Impossibile autenticarsi\n";
print "\n". $res->content
if $verbose;




the form that i have to click send post-data at a https address
and when the script perform the "click" it send an error and the
program crash.

The error is "Bus error"

pluto-5:~ fee$ ./timsms.pl -d 384756855 -t "bye"
Bus error

Could Anyone help me?



Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question