Search the web
Sign In
New User? Sign Up
apache-asp · Apache::ASP
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Capture sessionID in browser from perl script   Message List  
Reply | Forward Message #2266 of 2277 |
Re: Capture sessionID in browser from perl script

Hi,
The cookies would be stored in the cookie store mentioned, cookies.dat.
You can aswell check errors for every call. In mycase if need not
check the sessionid, but just pass the obtained sessionid embedded in
the further web requests

let me know what u find

thanks
pavan

On Fri, Jun 19, 2009 at 12:10 PM, aura networks<laki.sreekanth@...> wrote:
>
> My Perl code:
>
> #!/usr/bin/perl -w
>
> use HTTP::Cookies;
> use HTTP::Request::Common;
> use LWP::UserAgent;
>
> $ua = new LWP::UserAgent;
> if(! $ua)
> {
> print "Can not get the page :UserAgent fialed \n";
> return 0;
> }
>
> my $cookies=new HTTP::Cookies(file=>'./cookies.dat',autosave=>1);
> $ua->cookie_jar($cookies);
> # push does all magic to exrtact cookies and add to header for further reqs.
> useragent should be newer
> push @{ $ua->requests_redirectable }, 'POST';
> $result = $ua->request(POST " http://erail.in http://erail.in ");
> print $result;
> ______________
> Through this program i am not able to capture the Session id/cookie value
> from the opened site(in the script)
> I am getting this output: HTTP::Response=HASH(0xacc640)
>
> Please suggest me how to capture the session-id....
>
> Thanks,
> Lakshmi Sreekanth
> --
> View this message in context:
http://www.nabble.com/Capture-sessionID-in-browser-from-perl-script-tp22822820p2\
4106307.html

> Sent from the Apache - Asp mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: asp-unsubscribe@...
> For additional commands, e-mail: asp-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@...
For additional commands, e-mail: asp-help@...




Fri Jun 19, 2009 6:54 am

sudarshan12s@...
Send Email Send Email

Forward
Message #2266 of 2277 |
Expand Messages Author Sort by Date

Hi All, I have a requirement to test webserver using perl scripts. The webserver creates a sessionId after successfull authentication. Hence for futher...
Sudarshan Soma
sudarshan12s@...
Send Email
Apr 1, 2009
9:26 am

... use HTTP::Cookies; use HTTP::Request::Common; use LWP::UserAgent; $ua = LWP::UserAgent->new; $requestString = "http://x.y.x.w"; ...
Thanos Chatziathanass...
tchatzi@...
Send Email
Apr 1, 2009
9:52 am

Thanks a lot . I have a followup query, can anyone please advice me: My application (webser) will set up sessionId in the cookie and sets redirect URL to main...
Sudarshan Soma
sudarshan12s@...
Send Email
Apr 3, 2009
2:10 pm

... You really need to familiarize yourself with perldoc (or google for that matter ;) To the matter at hand: redirects should work quite as expected. If they ...
Thanos Chatziathanass...
tchatzi@...
Send Email
Apr 3, 2009
2:28 pm

... Thanks a lot. I got the final code now use warnings; use HTTP::Cookies; use HTTP::Request::Common; use LWP::UserAgent; { $ua = new LWP::UserAgent; if(!...
Sudarshan Soma
sudarshan12s@...
Send Email
Apr 9, 2009
5:23 am

... Since this is a mod_perl list, you might want to consider ``use strict;'' as well (actually you might consider using strict anyhow) ... I've never had an...
Thanos Chatziathanass...
tchatzi@...
Send Email
Apr 9, 2009
9:37 am

http://www.nabble.com/file/p24106268/final.pl final.pl Here i am not getting the Session-id / cookie-value from the browser, just i am getting the below...
aura networks
laki.sreekanth@...
Send Email
Jun 19, 2009
6:35 am

My Perl code: #!/usr/bin/perl -w use HTTP::Cookies; use HTTP::Request::Common; use LWP::UserAgent; $ua = new LWP::UserAgent; if(! $ua) { print "Can not get the...
aura networks
laki.sreekanth@...
Send Email
Jun 19, 2009
6:40 am

Hi, The cookies would be stored in the cookie store mentioned, cookies.dat. You can aswell check errors for every call. In mycase if need not check the...
Sudarshan Soma
sudarshan12s@...
Send Email
Jun 19, 2009
6:56 am

Contents in cookies.dat file: #LWP-Cookies-1.0 Output: HTTP::Response=HASH(0xafebd0) Tell me the way to get session-id pls pls... -- View this message in...
aura networks
laki.sreekanth@...
Send Email
Jun 19, 2009
11:35 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help