View previous topic :: View next topic |
Author |
Message |
jromariz
Joined: 03 Apr 2002 Posts: 264 Location: Brasil
|
Posted: Thu May 03, 2012 10:37 am Post subject: Login to Web Page Using Captcha |
|
|
Hi,
I need to monitor the login to a certain web page with Host Monitor. The problem is that this page, besides username and a password asks for a captcha string. I do have a special string that would always work but I cannot find where should I place this captcha string on the test for it to be able to login.
Any ideas?
Thanks again.
Regards,
Jromariz. |
|
Back to top |
|
|
KS-Soft Europe
Joined: 16 May 2006 Posts: 2832
|
Posted: Thu May 03, 2012 11:12 am Post subject: |
|
|
First of all you should check web page source code.
If captcha string can be passed like simple HTML "Input" parameter of POST/GET "Form" with username and password, then you may use HTTP or URL request test methods with POST/GET data request.
E.g. If web page source code looks like the following:
Code: | <form action="http://test.com/login.php" method="POST">
<input type="text" name="login">
<input type="password" name="psw">
<input type="text" name="captchastring">
<input type="submit">
</form> |
"HTTP POST request" parameter of URL request test should look like:
login=TestLogin&psw=TestPassword&captchastring=YourFixedCaptchaString |
|
Back to top |
|
|
jromariz
Joined: 03 Apr 2002 Posts: 264 Location: Brasil
|
Posted: Thu May 03, 2012 11:29 am Post subject: |
|
|
Hi,
Thanks for your fast reply. Here´s part of the page code that, I believe, is related to username, password and captcha.
Would it be to much to ask if you could help me format the poste string?
<label for="txtLogin" id="lblLogin" class="label">Login</label>
<span id="revLogin" class="validator" style="visibility:hidden;">*</span>
<input name="txtLogin" type="text" maxlength="50" id="txtLogin" class="textBox" style="width:160px;" />
<span id="rfvLogin" class="validator" style="visibility:hidden;">*</span>
</li>
<li>
<label for="txtPassword" id="lblPassword" class="label">Senha</label>
<span id="rfvPassword" class="validator" style="visibility:hidden;">*</span>
<input name="txtPassword" type="password" maxlength="20" id="txtPassword" class="textBox" style="width:60px;" />
</li>
<li>
<label for="txtCaptcha" id="lblCaptcha" class="label">Código</label>
<span id="rfvCode" class="validator" style="visibility:hidden;">*</span>
Tahnks a lot.
Jromariz. |
|
Back to top |
|
|
KS-Soft Europe
Joined: 16 May 2006 Posts: 2832
|
Posted: Thu May 03, 2012 11:39 am Post subject: |
|
|
This part of page code contain only two input fields:
1. <input name="txtLogin" type="text" ..... >
2. <input name="txtPassword" type="password" .... >
while you need third input field for captcha string.
Please check whole page code between <form ... > and </form> HTML tags |
|
Back to top |
|
|
jromariz
Joined: 03 Apr 2002 Posts: 264 Location: Brasil
|
Posted: Thu May 03, 2012 12:04 pm Post subject: |
|
|
Ok I found the missing part. Just one more question: the URL for the test should be the login page or any page after the login, I mean any page that is protected by the login page?
Hope you will understand.
Regards,
Jromariz. |
|
Back to top |
|
|
KS-Soft Europe
Joined: 16 May 2006 Posts: 2832
|
Posted: Thu May 03, 2012 12:11 pm Post subject: |
|
|
You should use URL, specified in "action" parameter of <form> tag.
E.g. If form tag looks like:
<form action="http://test.com/login.php" method="POST">
URL should looks like:
http://test.com:80/login.php
or
http://test.com/login.php
Please note: action parameter may contain relative address, like action="login.php", however, for URL request test you should specify full URL. |
|
Back to top |
|
|
jromariz
Joined: 03 Apr 2002 Posts: 264 Location: Brasil
|
Posted: Thu May 03, 2012 12:23 pm Post subject: |
|
|
Ok,
Once again thanks a lot for your help!
Regards,
Jromariz. |
|
Back to top |
|
|
KS-Soft Europe
Joined: 16 May 2006 Posts: 2832
|
Posted: Thu May 03, 2012 12:24 pm Post subject: |
|
|
You are welcome |
|
Back to top |
|
|
|