Sponsored Content
Full Discussion: Login using perl LWP module
Top Forums Shell Programming and Scripting Login using perl LWP module Post 302474861 by Corona688 on Thursday 25th of November 2010 05:51:42 PM
Old 11-25-2010
Obviously I can't test it given I don't have the username and pw but that site is definitely not using basic authentication. They've got a login form on their mainpage like so:

Code:
<form name="aspnetForm" method="post" action="index.aspx" onsubmit="javascript:return WebForm_OnSubmit();" id="aspnetForm">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJODk3NjczNDQzZBgKBRdjdGwwMCRtdHZNYWluVGFiU..." />
</div>

...

      <div class="logonCont">      
      
                
                <i>Username:</i><input name="ctl00$ContentPlaceHolder1$LogonUserNameTextBox" type="text" maxlength="50" id="ctl00_ContentPlaceHolder1_LogonUserNameTextBox" class="unnamed1" />
...
                <i>Password:</i><input name="ctl00$ContentPlaceHolder1$LogonPasswordTextBox" type="password" maxlength="20" id="ctl00_ContentPlaceHolder1_LogonPasswordTextBox" class="unnamed1" />
...
                <input type="image" name="ctl00$ContentPlaceHolder1$LogonButtons" id="ctl00_ContentPlaceHolder1_LogonButtons" class="BtnLogon" 
...
</form>

I adore the glorious futility of putting hidden elements inside their own <div> Smilie But anyway. You'll need to POST some data like
Code:
ctl00$ContentPlaceHolder1$LogonUserNameTextBox=xxxx&ctl00$ContentPlaceHolder1$LogonPasswordTextBox=xxxx

to http://drivehq.com/index.aspx, and you might need to throw all those hidden variables in along with it. See what I mean by annoying?

Last edited by Corona688; 11-25-2010 at 06:59 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

LWP module ?

my host run on a Free bsd server and i have a cgi script that requires LWP module, but i my host say that that module is installed, so i would like to know if the is a command because i have telnet access to know if the module or which modules are installed on my account (itīs that the script donīt... (4 Replies)
Discussion started by: Beto
4 Replies

2. Shell Programming and Scripting

Replace Perl Module name in all Perl scripts

I want to replace a Perl module name in all my Perl Scripts in the cgi-bin directory. How is it possible? I have the following statement in my scripts use myUtil; I want to change it to use myUtil777; Regards, Rahul (2 Replies)
Discussion started by: rahulrathod
2 Replies

3. Shell Programming and Scripting

Help needed in Perl LWP module

Hi, I've a issue in writing a perl script that will automatically monitor the site availability. There are two different cookies are set in two consecutive flows to a URL and this second cookie has to be passed to the third step which actually gives permission to access based upon the cookie. ... (1 Reply)
Discussion started by: dayanandra
1 Replies

4. Shell Programming and Scripting

Help with Perl Module

I dont know if this is a dumb question, but I am unable to move ahead and need help - There is a perl module called Header.pm which was written by someone else. I am trying to write a simple perl script which uses a function provided by the module. The function has been exported by the module... (9 Replies)
Discussion started by: NewDeb
9 Replies

5. Shell Programming and Scripting

How to call a shell script from a perl module which uses Filehandle to login

Hi Guru's, Pardon me for the breach of rules..... I have very little knowledge about Shell Programming and Scripting hope you guys help me out of this troble I have very little time hence could not find the right way to direct my queries. coming to the problem I need to call a... (2 Replies)
Discussion started by: saikrishna_tung
2 Replies

6. Shell Programming and Scripting

calling perl subroutine from perl expect module

All, Is it possible to call a subroutine from the perl expect module after logging to a system that is within the same program. My situation is I need to run a logic inside a machine that I'm logging in using the expect module, the logic is also available in the same expect program. Thanks,... (5 Replies)
Discussion started by: arun_maffy
5 Replies

7. Shell Programming and Scripting

Perl LWP user authentication

Hello all.. i am new to perl scripting.. i wanted to parse a text file, encode the parsed text and attach in url.. please point me to right resources if you know any..This is my major problem. Now i try to get a url running and save it in a text file using LWP module in perl, I used following... (0 Replies)
Discussion started by: empyrean
0 Replies

8. Shell Programming and Scripting

perl lwp find word and print next word :)

hi all, I'm new there, I'm just playing with perl and lwp and I just successfully created a script for log in to a web site with post. I have a response but I would like to have something like this: I have in my response lines like: <div class="sender">mimi020</div> <some html code.....>... (3 Replies)
Discussion started by: vogueestylee
3 Replies

9. Shell Programming and Scripting

Perl SSH without a perl module

I'm trying to create a perl script that will do 1 SSH session, but be able to write multiple commands to the session and receive multiple outputs. I know there are modules out there like Net:SSH::Perl, but I'm not allowed to use it. I was thinking of doing something like an open3 on an ssh... (4 Replies)
Discussion started by: mrwatkin
4 Replies

10. Shell Programming and Scripting

parsing a webpage - perl lwp

I am requesting for the text parsing section below. Any helps are highly appreciated. <tr valign="top"><td nowrap>Source name</td> <td style="text-align: justify">Sample Name<br></td> I want Sample Name from above. In the same file, I have to search for another pattern like this <td><a... (1 Reply)
Discussion started by: jacobs.smith
1 Replies
ISCSI.CONF(5)							File Formats Manual						     ISCSI.CONF(5)

NAME
iscsi.conf - iSCSI Target and LUN configuration SYNOPSIS
/etc/iscsi.conf DESCRIPTION
This manual page describes the format of the /etc/iscsi.conf file. This file is a simple text file that iscsid(8) uses to locate iSCSI tar- get devices and LUNs. Comments are marked by lines beginning with '#'. Available entries include: DiscoveryAddress=<address> IP address or hostname to use for target discovery. A TCP port number may be specified by appending a colon followed by the port number. This entry must start in the first column, and must not contain any whitespace. TargetIpAddr=<address> A synonym for DiscoveryAddress. Username=<user> Specify the authentication user. If this entry precedes all DiscoveryAddress entries, it serves as the default. If this entry is indented under a DiscoveryAddress entry, it specifies the user for all targets discovered at that IP address. Password=<pass> Specify the authentication password for the previously listed iSCSI If this entry precedes all DiscoveryAddress entries, it serves as the default. If this entry is indented under a DiscoveryAddress entry, it specifies the user for all targets discovered at that IP address. EXAMPLE
# set the default user and password Username=alice Password=nty57nbe # targets at this address will use the default Username and Password DiscoveryAddress=192.168.10.94 # targets at this address will use the Username and Password below DiscoveryAddress=192.168.10.95 Username=beatrice Password=93fdgc20 NOTES
The iSCSI initiator drivers, README files, and example configuration files are available on the Linux-iSCSI homepage at: http://linux-iscsi.sourceforge.com <http://linux-iscsi.sourceforge.com> FILES
/etc/iscsi.conf iSCSI Target and LUN configuration SEE ALSO
iscsid(8) $Revision: 1.9 $ $Date: 2002/09/19 20:00:32 $ ISCSI.CONF(5)
All times are GMT -4. The time now is 11:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy