Bus error on https get request

Discussion in 'Perl Misc' started by fi.masini@gmail.com, Mar 20, 2006.

  1. Guest

    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
    , Mar 20, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Adam
    Replies:
    0
    Views:
    370
  2. ben
    Replies:
    4
    Views:
    600
    Martin Ambuhl
    Jun 26, 2004
  3. Jon

    HTTPS GET request.

    Jon, Dec 14, 2007, in forum: Python
    Replies:
    0
    Views:
    343
  4. M. Norton
    Replies:
    9
    Views:
    1,335
  5. M. Norton
    Replies:
    1
    Views:
    745
Loading...

Share This Page