Bus error on https get request

F

fi.masini

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 });
$ua->agent($agent);

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

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


$res = $ua->request($form[1]->click);
#https://www.tim.it/yacasWeb/mac/login.do

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

print "Impossibile autenticarsi\n";
print "\n". $res->content
if $verbose;
exit($failure);
}

connect_error();

}

-------------------------------------------------------------------------------------

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?

Thanx
 

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

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top