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


In reply to Re^12: Automate WebLogin by libvenus
in thread Automate WebLogin by libvenus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.