in reply to Re^10: Automate WebLogin
in thread Automate WebLogin

That's great for you.

Now you just have to find out what your Perl script sends, and eliminate the differences, and you're all set.

If you have further questions, please refer to the answers you already got from me in my above replies.

Replies are listed 'Best First'.
Re^12: Automate WebLogin
by libvenus (Sexton) on Oct 12, 2011 at 12:57 UTC

    While trying to send the request using sockets I was able to get the response back from the webserver the first time.Second time it just dies; i m not able to get any error while debugging:

    my $client = IO::Socket::SSL->new("xyz.com:https") || warn "I encountered a problem: ".IO::Socket::SSL::errst +r(); print $client "GET /main.cfm HTTP/1.1\n"; print $client "Host: xyz.com\n"; print $client "User-Agent: low_level/1.0\n"; print $client "Accept: text/html,application/xhtml+xml,application/xml +;q=0.9,*/*;q=0.8 \n"; print $client "Accept-Language: en-us,en;q=0.5 \n"; print $client "Accept-Encoding: gzip, deflate \n"; print $client "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 \n"; print $client "Connection: keep-alive \n\n"; { local $/ = undef; my $res = <$client>; print $res; ($cfid, $cftoken) = ($res =~ /(CFID=.+?\;).*(CFTOKEN=.+?)\;/s ); } print "Subsequent Req. \n"; print $client "GET /login.cfm?dparm=main HTTP/1.1\n"; print $client "Host: xyz.com\n"; print $client "User-Agent: low_level/1.0\n"; print $client "Accept: text/html,application/xhtml+xml,application/xml +;q=0.9,*/*;q=0.8 \n"; print $client "Accept-Language: en-us,en;q=0.5 \n"; print $client "Accept-Encoding: gzip, deflate \n"; print $client "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 \n"; print $client "Connection: keep-alive \n"; print $client "Cookie: $cfid $cftoken \n\n"; print <$client>;

    The script ends abruptly after the excuting the following code without any stack trace:

    Net::SSLeay::ssl_write_all(blib/lib/Net/SSLeay.pm (autosplit into blib +/lib/auto/Net/SSLeay/ssl_write_all.al):1654): 1654: $wrote = write_partial($ssl, $written, $to_write, $$da +ta_ref); DB<2> [app_user@sandhost perl]$

    Version Info: Net::SSLeay - 1.30 IO::Socket::SSL - 1.44 perl verions - 5.8.8

        I just did that and the response header that I get back:

        Cache-Control: no-cache Date: Thu, 13 Oct 2011 09:17:22 GMT Pragma: no-cache Server: metadeal/6.1.1.2 (Build 110418) Content-Length: 69873 Content-Type: text/html Expires: 0 Client-Date: Thu, 13 Oct 2011 09:17:05 GMT Client-Peer: 135.37.81.134:443 Client-Response-Num: 1 Client-SSL-Cert-Issuer: /C=xx/O=XYZ_ZYX, Inc./OU=XYZ NN/OU=Terms of us +e at https://www.zzz.com/delta (c)09/CN=secure class Client-SSL-Cert-Subject: /C=xx/ST=YY/L=XXXXXXX/O=XYZ Services Inc/OU=C +SO/CN=www.xyz.com Client-SSL-Cipher: AES256-SHA Client-SSL-Warning: Peer certificate not verified P3p: CP="NON CUR OTPi OUR NOR UNI" Set-Cookie: PD-S-SESSION-ID=2_0_ZDMTWQ5T7oAp-lM11zDoaI-exD716V5AJg6f6q +Cxoey4bHvQ; Path=/; Secure Title: XYZ : Login X-Meta-Description: XYZ Logon. X-Meta-Keywords: security, logon

        I have hit the digital signature verification. I m a little skeptic on proceeding further. Please suggest...