develooper Front page | perl.libwww | Postings from April 2001

still having problems with connecting to wells fargo web site

Thread Next
From:
Hill, Ronald
Date:
April 10, 2001 11:32
Subject:
still having problems with connecting to wells fargo web site
Message ID:
9DBD698C2310D51199E00090278A071B08EA64@cypntx1.ugsolutions.com
HI All,

I am still trying to connect to the wellsfargo web site. I am able to get
passed the login screen but that is it. I have turned on the debugging
options in lwp and I thing I have found something but I don't know how to
handle it. I noticed this :
Refresh: 1;
URL=https://mn1-gx5-ib.banking.wellsfargo.com/cgi-bin/session.cgi?sessarg
[etc]
My question is this, How can I force LWP to follow a refresh command and
pass the url that it refers to?
any ideas?

Thanks,

Ron Hill

use HTTP::Request::Common;
use LWP::UserAgent;
use LWP::Debug qw(+);
BEGIN {
    *LWP::UserAgent::redirect_ok = sub {1}
}
use HTTP::Cookies;
use File::Basename;
use strict;
usage() unless (@ARGV);
my $cookie = 'c:\temp\cookie_jar.txt';
unlink $cookie;

my $ua = LWP::UserAgent->new;
$ua->cookie_jar(
  HTTP::Cookies->new(
  file           => "$cookie",
  autosave       => 1)
  );
$ua->agent('Mozilla/4.73');

my $req = $ua->simple_request( POST 'https://banking.wellsfargo.com' );

my $req = $ua->simple_request(
  POST
'https://mn1-gx5-ib.banking.wellsfargo.com/cgi-bin/session.cgi?screenid=SIGN
ON',
  {
      userid            => "$ARGV[0]",
      password          => "$ARGV[1]",
      'Account Summary' => 'Account Summary'
  }
);

while ( $req->is_redirect ) {
    my $u = $req->header('location') or die "missing location: ";
    print "redirecting to $u\n";

    $req = $ua->simple_request( POST $u);

}
print $req->content;

sub usage() {

    my $file = basename $0;

    print <<END_USAGE;
Usage:

   \$ $file <option>

   where <option> is  [ID,password].

END_USAGE

    exit 0;

}    # sub usage()} # sub usage()

here is the output

D:\scripts>wells.pl [my args]
[snipped to make it shorter this is from the last response]

LWP::Protocol::http::request: reading response
LWP::Protocol::http::request: HTTP/1.1 200 OK
Server: Netscape-Enterprise/3.6 SP2
Date: Tue, 10 Apr 2001 17:21:45 GMT
Refresh: 1;
URL=https://mn1-gx5-ib.banking.wellsfargo.com/cgi-bin/session.cgi?sessargs=c
cb0c0fc9babcc6f7a85850f7c7bd2b9c
576a31f237341119ed2520df946765d
Pragma: no-cache
Expires: Mon, 01 Jan 1990 00:00:00 GMT
Content-type: text/html

LWP::Protocol::http::request: HTTP/1.1 200 OK
LWP::Protocol::collect: read 800 bytes

<HEAD>

<TITLE> Authenticating User </TITLE>

<!-- Skip auto-REFRESH in case of special announcements -->
</HEAD>
         <BODY BGCOLOR="#ffffff">

    <h2>Sign On to Wells Fargo Online&#174;</h2>
<hr>
<br>

<!-- P -->
<!-- no current insertion -->
<!-- P -->

<center>
<table border=3 bgcolor="#FFFFFF" align="center" width="420">

<tr>
  <td align="center">
  <table border="0" bgcolor="#FFFFFF" cellpadding="10" cellspacing="0"
width="100%">
        <tr>
          <td align="center"><img src="../common/images/stage2.gif"
align="left"
          hspace="0" width="95" height="65"><br>Your session has been
initiated.
          <br><B>Verifying your sign on information...</B></td>
        </tr>
<tr>
<td align="center">
<HR size=2 noshade width=75%>
</td>
</tr>

</table>
</td>
</tr>
</table>
</center>
<br>
<hr>

</BODY>
</HTML>

D:\scripts>

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About