Android Question Reading a web page that neeed user and pass

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
I´m trying to read
http://200.68.94.241/log.aspx?ReturnUrl=/cons.aspx?tipo=22&tipo=22

see image

This is the source code of the page where it ask for user and pass

<input name="txus" type="text" id="txus" class="txt" style="width:150px;" />
<input name="txpa" type="password" id="txpa" class="txt" style="width:150px;" />

I´m using a Webview control and:

Sub WebView1_UserAndPasswordRequired (Host As String, Realm As String) As String()
Return Array As String("1205", "partagas#1205")
End Sub

But it does not work

How can I do it?

PD I´m trying to see it just to test but I need to parse it once readed.

Thanks
 

Attachments

  • 2015-06-07_1249.png
    2015-06-07_1249.png
    5.8 KB · Views: 131

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
Sory dont understand you, may you please be more specific?
Form where can I copy the hidden params?
Thanks for your time!
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
in the form you need to look for <input type=hidden that are the parameters that need to be passed aswell as it might check for those.
 
Upvote 0

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
This is what I found...

<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="btin" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" /><input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTIxNDY5ODU5NTcPZBYCAgEPZBYCAgkPDxYCHgdWaXNpYmxlaGRkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYBBQRidGlu9+TYw0sfl63jhQaG3vvV1MBXVWIJc+Kd0I+JN/gHnng=" />
</div>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form2'];
if (!theForm) {
theForm = document.form2;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>

<div>
<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="881C1645" />
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEdAAXP2rylwL5U3oJ9bDnttCYzoiuHG1JM7SRvG7QXShBtUkHzh8XRDl787XQs/G4KtMFFNAdTqhzzY4gUBKAQB/9ZsbvItzGNuOxxNBTFmN4z7vd61t4TsFk7w6TQQ6ljIgyk/d8tg8q7AhxCLskGhhmZ" />
</div>
 
Upvote 0
Top