asp.net - Perl: Execute aspx 'login' script from Perl -


i have aspx script called login.aspx. receives 2 parameters - username , password. authenticates user. run in browser this:

https://www.website.com/login.aspx?username=myusername&password=mypassword

when execute browser correct username/password runs , loads web page.

when run perl (completely same url, correct username/password) error: 500 connect failed: connect: unknown error; unknown error @ test2.pl line 24.

my perl scripts follows. please me understand why fails perl.

#!/usr/bin/perl  use strict; use warnings;  use data::dumper;  use lwp::useragent;  # url addresses  $url_auth = 'https://www.website.com/login.aspx?username=myusername&password=mypassword';  $ua = lwp::useragent->new; $ua->env_proxy;  $response = $ua->get($url_auth);   if ($response->is_success) {      print $response->decoded_content;  }  else {      die $response->status_line;  } 

thank much!


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -