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
---------------------------------------------------
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