Fw: Logging in to form based log in page

Thanks for the response.  I tried that to no avail.  Here is what the "new"
code looks like:

my $myUserAgent = LWP::UserAgent->new;
$myUserAgent->agent("Automation/0.1");
my $myRequest = HTTP::Request->new(POST => $configSettings{"url"});
$myRequest->content_type('application/x-www-form-urlencoded');
$myRequest->content("URI=/documents/database.htm&From=wsjauth&Login=xyz&Pass
word=123");
my $myResponse = $myUserAgent->request($myRequest);

Thanks,
Kenny

----- Original Message -----
From: "WORENKLEIN, David, GCM" <David.Worenklein@gcm.com>
To: "'Kenny G. Dubuisson, Jr.'" <kdubuisson@kcmria.com>
Sent: Tuesday, July 09, 2002 10:12 AM
Subject: RE: Logging in to form based log in page


> 1. I don't know if WSJ fields are case sensitive, but they call them
> "Login" and "Password"
> 2. You're not passing the hidden fields
> <input type=hidden name=URI value="/documents/databank.htm">
> <input type=hidden name=From value="wsjauth">
>
> -----Original Message-----
> From: Kenny G. Dubuisson, Jr. [mailto:kdubuisson@kcmria.com]
> Sent: Tuesday, July 09, 2002 10:59 AM
> To: libwww@perl.org
> Subject: Logging in to form based log in page
>
> Hello all.  I'm trying to write a script that logs in to a web page that
> has the user name and password input boxes as part of the initial web
page.
> I've tried doing a "POST" with the user name and password declarations and
> values in the request to no avail.  Here is my code:
>
> my $myUserAgent = LWP::UserAgent->new;
> $myUserAgent->agent("Automation/0.1");
> my $myRequest = HTTP::Request->new(POST =>
> "http://online.wsj.com/login?URI=%2Fdocuments%2Fdatabank.htm");
> $myRequest->content_type('application/x-www-form-urlencoded');
> $myRequest->content("login=xyz&password=123");
> my $myResponse = $myUserAgent->request($myRequest);
>
> Any ideas on what I'm doing wrong?  I've double-checked the form input
> field names and they are "login" and "password".  Any help you could offer
> would be much appreciated.  I've ordered the new PERL & LWP book but it
> hasn't gotten here yet so I thought I'd post this message.
>
> Thanks,
> Kenny Dubuisson, Jr.
> Gulfport, Mississippi, USA
>
>
> **********************************************************************
> This e-mail is intended only for the addressee named above.
> As this e-mail may contain confidential or privileged information,
> if you are not the named addressee, you are not authorised to
> retain, read, copy or disseminate this message or any part of it.
> ************************************************************************
>

0
kdubuisson
7/9/2002 3:22:00 PM
perl.libwww 3335 articles. 0 followers. Follow

1 Replies
676 Views

Similar Articles

[PageSpeed] 23
Get it on Google Play
Get it on Apple App Store

"Kenny G. Dubuisson, Jr." wrote:
> 
> Thanks for the response.  I tried that to no avail.  Here is what the "new"
> code looks like:
> 
> my $myUserAgent = LWP::UserAgent->new;
> $myUserAgent->agent("Automation/0.1");
> my $myRequest = HTTP::Request->new(POST => $configSettings{"url"});
> $myRequest->content_type('application/x-www-form-urlencoded');
> $myRequest->content("URI=/documents/database.htm&From=wsjauth&Login=xyz&Pass
> word=123");
> my $myResponse = $myUserAgent->request($myRequest);

you might need to:
- pass an "approved" useragent string (e.g. MSIE)
- pass a HTTP_REFERER header indicating you "came from" the WSJ login page
- etc.
0
doug
7/9/2002 3:28:24 PM
Reply:

Similar Artilces:

Fw: Fw: Logging in to form based log in page
Doug: Thanks though I'm not sure exactly how to do that. Could you possibly provide an example of the header you spoke of? Thanks, Kenny > you might need to: > - pass an "approved" useragent string (e.g. MSIE) > - pass a HTTP_REFERER header indicating you "came from" the WSJ login page > - etc. "Kenny G. Dubuisson, Jr." wrote: > > Doug: > > Thanks though I'm not sure exactly how to do that. Could you possibly > provide an example of the header you spoke of? Thanks, > Kenny > > > you might...

Fw: Fw: Logging in to form based log in page #2
I am the dumbest person who ever walked this planet. DOH.. Thanks for the catch. (name changed to protect the stupid) ----- Original Message ----- From: "Leif" <yuri329@sonic.net> To: "Kenny G. Dubuisson, Jr." <kdubuisson@kcmria.com> Sent: Tuesday, July 09, 2002 3:11 PM Subject: Re: Fw: Logging in to form based log in page > > On Tuesday, July 9, 2002, at 01:05 PM, Kenny G. Dubuisson, Jr. wrote: > > my $form = HTML::Form->parse( $request->content, $request->base()); > > #print $form->dump; > > $form->value...

Fw: Logging in to form based log in page #5
Nevermind, I got it. Below is the code. Thanks to all for everyone's help. What a GREAT list. Never belonged to one with people who responded so quickly. Thanks again, Kenny se strict; use HTTP::Request::Common; use HTML::Form; use LWP::UserAgent; #use LWP::Debug qw(+); use HTTP::Cookies; use FileHandle; #BEGIN #{ # local $^W = 0; # *LWP::UserAgent::redirect_ok = sub {1} #} my $ua = LWP::UserAgent->new(); $ua->agent("Automation/0.1"); $ua->cookie_jar( HTTP::Cookies->new( autosave => 1 )); my $request = $ua->request( POST...

Fw: Logging in to form based log in page #3
Ron: Does it have to select the second one...i.e. would the first (default) one work? Thanks, Kenny > by default HTTP::Form will select the first submit button but the form > contains 2 of them > and I have no idea how to tell HTTP::Form to click the second one ( since > they both have no name). > If anyone has a way to do this I would like to know :-) > > I hope this helps > > Ron Hill ...

Fw: Logging in to form based log in page #4
When I manually do this process, after I click the log in button, I get a dialog box warning stating that I'm about to transfer to a non-secure page. I have to click "OK" and then the browser (IE) goes on to the desired page. Do you think that the dialog box could be hangin it up? Do you know of a way to clear that dialog box from the code? Thanks again, Kenny ----- Original Message ----- From: "Hill, Ronald" <ronald.hill@eds.com> To: "'Kenny G. Dubuisson, Jr.'" <kdubuisson@kcmria.com>; <libwww@perl.org> Sent: Tuesday, ...

Fw: Logging in to form based log in page #2
Ron: You code worked well. I just have one question...how do I get the final page that I was supposed to be redirected to once I logged in. Below is the code I tried with the goal of having the final web page text in the temp HTML file; what I get now seems to be the cookie data. I tried "$response->content" also but it was empty. use strict; use HTTP::Request::Common; use HTML::Form; use LWP::UserAgent; #use LWP::Debug qw(+); use HTTP::Cookies; use FileHandle; my $ua = LWP::UserAgent->new(); $ua->agent("Automation/0.1"); $ua->cookie_ja...

Logging in to form based log in page
------=_NextPart_000_004F_01C2272F.3F915330 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello all. I'm trying to write a script that logs in to a web page that = has the user name and password input boxes as part of the initial web = page. I've tried doing a "POST" with the user name and password = declarations and values in the request to no avail. Here is my code: my $myUserAgent =3D LWP::UserAgent->new; $myUserAgent->agent("Automation/0.1"); my $myRequest =3D HTTP::Request->new(PO...

RE: Logging in to form based log in page
> -----Original Message----- > From: Kenny G. Dubuisson, Jr. [mailto:kdubuisson@kcmria.com] > Sent: Tuesday, July 09, 2002 7:59 AM > To: libwww@perl.org > Subject: Logging in to form based log in page > > > Hello all. I'm trying to write a script that logs in to a > web page that has the user name and password input boxes as > part of the initial web page. I've tried doing a "POST" with > the user name and password declarations and values in the > request to no avail. Here is my code: [snipped] Hi Kenny; Try...

RE: Logging in to form based log in page #2
[snipped] > > Ron: > > You code worked well. I just have one question...how do I > get the final > page that I was supposed to be redirected to once I logged > in. Below is the > code I tried with the goal of having the final web page text > in the temp > HTML file; what I get now seems to be the cookie data. I tried > "$response->content" also but it was empty. [more snippage] > > use strict; > > use HTTP::Request::Common; > > use HTML::Form; > > use LWP::UserAgent; > > use LWP::Debug...

RE: Logging in to form based log in page #3
[snipped] > > Ron: > > Does it have to select the second one...i.e. would the first > (default) one > work? Thanks, > Kenny I believe it is selecting the first one, and it will just hang. Here is the output from the debug LWP::UserAgent::new: () LWP::UserAgent::request: () HTTP::Cookies::add_cookie_header: Checking online.wsj.com for cookies HTTP::Cookies::add_cookie_header: Checking .wsj.com for cookies HTTP::Cookies::add_cookie_header: Checking wsj.com for cookies HTTP::Cookies::add_cookie_header: Checking .com for cookies LWP::UserAgent::send_req...

why after I log out my website and log in again. the last page that I logged out on thats the page I am redirected to...
why after I log out my website and log in again. the last page that logged out on thats the page I am redirected to...when logged in again. I thougt when you login though thr login control it goes to the assigned destination page. well, my website is not doing that. whatever page the user has last visited and the user decides to login again thats the page the user will be redirected to after they login. I am using the person website starter template. any ideas why this happens and/or how to fix it? This is the default behaviour of login control , it redirect back the user to the page that...

Logged In As: Not Logged In
I installed ZCF 10.0.1 on a Win 2K3 server and when I install the ZEN client on a workstation the ZENWORKS client login comes up and I cannot log into it. It shows me the realm name of my tree and Zenworks Zone and I have tried both to no avail. When I look at the details of the adaptive agent it says, "Logged In As: Not Logged In" Any ideas? On Fri, 11 Jan 2008 14:55:21 GMT, Jayson E. Hahn wrote: > Any ideas? Debug logs in ZCM http://www.novell.com/support/search.do?cmd=displayKC&docType=kc&externalId=3418069&sliceId=SAL_Public&dialogID=51010132...

Logging log
Hi! I try to accomplish task described in http://forums.novell.com/novell-product-support-forums/zenworks/configuration-management/zcm-server-install/422609-mixed-login.html?pagenumber= and wonder I don't know how to keep log of logging? I mean, does ZCM is capable to keep logging log? As Altiris NS does? More thanks, Alar. -- NovAlf ------------------------------------------------------------------------ You look like you want to log in to your zone as a user from either a eDIR or AD. And yes this is possible, it will search both Directories. http://www.theurbanp...

To log or not to log
Hello foremen, on a large database, trillions of SELECTs and DELETEs are going to be performed. After that, the database is going to be unloaded. The database uses a transaction log. Should I keep the log there along this process or "unmount" it after some parts of it (or even before the beginning)? In this case, nothing but the speed is important. The database is ASA 7.0.4.3498. Thanks Pavel LOG... ALWAYS LOG. Performance is dependent on the use of the log. Recommendations: 1) Ensure that the file system is not excessively fragmented 2) Host the db f...

Web resources about - Fw: Logging in to form based log in page - perl.libwww

Logging - Wikipedia, the free encyclopedia
or skeleton cars . In forestry , the term logging is sometimes used in a narrow sense concerning the logistics of moving wood from the stump ...

More Japanese Users Logging On To Facebook
For years, Mixi has been the social media site of choice in Japan. But new reports suggest that Facebook could overtake Mixi by the end of the ...

‘Trusted Contacts’ lets users turn to friends for help logging into Facebook
Facebook today announced “Trusted Contacts,” an update to its “ Trusted Friends ” security feature that sends access codes to a few of a user’s ...

Reps & Sets - Gym Logging on the App Store on iTunes
Get Reps & Sets - Gym Logging on the App Store. See screenshots and ratings, and read customer reviews.

Logging into the iPad...jailbreak style - YouTube
Very early work on porting "Spirit" jailbreak by @comex to iPad ... Questions: http://twitter.com/MuscleNerd

Halting highlands logging could prove lucrative
A report says halting logging in the central highlands could boost the state's coffers.

Conservation areas to be opened up to logging
State forests set aside as conservation areas by the previous Labor government could be declassified and reopened for commercial logging and ...

South Coast residents concerned about bushfire risk from logging slash
... on the NSW south coast have expressed alarm at &quot;metres high&quot; piles of logs, leaves and branches left on forest floors after logging, ...

O'Farrell government rejects call for logging in national parks
The O'Farrell government has rejected calls from an inquiry led by the Shooters and Fishers Party to allow logging in reserved areas

Logging out? Why young people love to hate Facebook
Researchers, journalists writing about research, and young people themselves have been writing about the perceived decline of Facebook for a ...

Resources last updated: 12/29/2015 4:23:39 PM