Issue with form-based login


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Issue with form-based login
# 1  
Old 05-16-2012
Issue with form-based login

Hello,

I'm trying to build a script which logins to an application and logout, where the user would input URL, credentials, no. of users, iterations etc. The objective is to test max no. of sessions our reverse proxy apache can handle.

I'm trying to handle the application login and logout with curl, but stuck at a point. Just to mention, I'm quite new to curl and never used it before.

Here's the cource:
HTML Code:
<body onLoad="init();">
 
<table cellSpacing=0 cellPadding=0 width="100%" height="40" border=0>
 
<tr>
<td align="center">
<a href="http://www.zadig-hr.adp.com" title="Z@dig Networking People" rel="sidebar" onclick="bookmark(this);">Ajouter aux Favoris</a>
 
</td>
</tr>
</table>
 
 
<div id="container">
 
<div id="header">
<h1>Vos codes confidentiels</h1>
</div>
 
<div id="content">
 
<div id="body_text">
 
<div id="intro">
<p>A partir de cette page,</p>
<p>vous consultez des informations individuelles</p>
<p>de manière sécurisée.</p>
</div>
 
<div id="connection">
<form name="loginform" method="POST">
<input type=hidden name=target value="https://rp6.bench.ehc.adp.com/index_lsprh.html"/>
<input type=hidden name=smauthreason value="0"/>
 
<label for="HTTP_login">Identifiant :</label>
<input type="text" id="HTTP_login" tabindex="1" name="USER" title="Entrez votre identifiant"/>
 
<label for="password">Mot de passe :</label> 
<input type="password" id="password" tabindex="2" name="password" title="Entrez votre mot de passe"/>
 
<input type="hidden" name="target" value="https://rp6.bench.ehc.adp.com/index_lsprh.html"/>
<input type="hidden" name="smauthreason" value="0"/>
 
<input type="submit" class="abox" value="Valider" tabindex="3" title="Cliquez sur Valider ou appuyez sur la touche Entrée du clavier pour entrer dans Z@dig"/>
</form>
</div>
 
</div>
 
</div>
 
 
<div id="text_status">
<a href="/siteminderagent/pwcgi/smpwservicescgi.exe?SMLOCALE=FR-FR&SMAGENTNAME=s2uV8pMx7pQ+yUUrfiIGkme9FfRRMzZ8AkgpHMTZaaKvrgCvd/A99CuE2IG3sVvp&SMAUTHREASON=34&TARGET=https://rp6.bench.ehc.adp.com/index_lsprh.html">Cliquez ici pour changer votre mot de passe <br></a>
<a href="/pwdsvc/GetForgottenLoginForm.jsp"> Avez vous oublié votre identifiant ? <br> </a> 
<a href="/pwdsvc/GetForgottenPasswordForm.jsp"> Avez vous oublié votre mot de passe ? <br> </a> 
</div>
I've tried the following:


Code:
curl --cookie-jar cjar --cookie cjar -k -L --data "target=https://rp6.bench.ehc.adp.com/index_lsprh.html&smauthreason=0&USER=username&password=xyz&target=https://rp6.bench.ehc.adp.com/index_lsprh.html&smauthreason=0&submit=Valider" --output Z2X1.html --request POST https://rp6.bench.ehc.adp.com/index_lsprh.html 

But it just returns the same login page.

Could anyone please help me?

Regards,

Last edited by Scrutinizer; 05-17-2012 at 09:13 AM.. Reason: code tags, formatting
# 2  
Old 05-17-2012
Any inputs please??
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Web Development

Curl - post form issue

I'm having an issue with curl post form, I dont' understand what I'm mising. I would like to send a post command login/password to a form, quite simple in the paper. URL : http: // <myebsite> / login Here the form source code : <form action="/login_check" method="post"> <input... (3 Replies)
Discussion started by: Fred13
3 Replies

2. AIX

Rstrict login based on ip address

Hi All, I want to check the system ip from which someone is trying to login using a specific user id, suppose "admin". If the ip is not like 182.10.191.* than the user shouldn't be able to login using the admin id. This is just to restrict the admin login from within a range of ip only. Can... (3 Replies)
Discussion started by: sraj142
3 Replies

3. Solaris

Login issue

Hello, I'm trying to setup my Solaris 10 servers to authenticate from a OpenLDAP server. I can get the Linux servers to authenticate from a OpenLDAP server, but not server the Solaris servers. Below I have posted some output so you can see my issue. <terminal output> -bash-3.00$ id... (5 Replies)
Discussion started by: bitlord
5 Replies

4. Linux

Login issue

Hi, I have created one normal login id . When they have try to login then, They got error msg the permission denied. Please advice on this. Thanks, Mani (3 Replies)
Discussion started by: Mani_apr08
3 Replies

5. Programming

Creating a web based id request form

Please pardon my ignorance, but I need to create a web-based form which can be used to request access to the unix servers in our environment. It just needs to have input fields for basic info (name, dept., etc.), and perhaps a drop-down box with the names of the servers. The form will be submitted... (2 Replies)
Discussion started by: wjssj
2 Replies

6. Shell Programming and Scripting

Transfer files with web based form by date

Not sure how I should approach this one. I have server X and Server Y. X is a collector. All files are seperated by hour. Y is used strictly for analysis. I do not always need all files from X. Sometimes other people use Y for analysis and do not always know how to transfer the files from... (3 Replies)
Discussion started by: mrlayance
3 Replies

7. UNIX for Advanced & Expert Users

How to parse through a file and based on condition form another output file

I have one file say CM.txt which contains values like below.Its just a flat file 1000,A,X 1001,B,Y 1002,B,Z ... .. total around 4 million lines of entries will be in that file. Now i need to write another file CM1.txt which should have 1000,1 1001,2 1002,3 .... ... .. Here i... (6 Replies)
Discussion started by: sivasu.india
6 Replies

8. Shell Programming and Scripting

placeing all work in a file form login

hai i want to place every work done by me in a file form login to logout. ex:- login : abc password: xxxx $pwd /home/abc $ls -l list of files in dir $logout now i want to place all commands given by me in a file for later reference. (5 Replies)
Discussion started by: g_s_r_c
5 Replies

9. UNIX for Advanced & Expert Users

Changing Unix form to Microsoft Word form to be able to email it to someone.

Please someone I need information on how to change a Unix form/document into a microsoft word document in order to be emailed to another company. Please help ASAP. Thankyou :confused: (8 Replies)
Discussion started by: Cheraunm
8 Replies
Login or Register to Ask a Question