in reply to Re^2: How to login to a form which has Javascript OnSubmit method usirng Perl
in thread How to login to a form which has Javascript OnSubmit method usirng Perl
All a server does is send data to a user agent - and that data has the form of HTML with embedded javascript - it doesn' t have any kind of control over how the user agent interprets the data.
So all your script has to do is to send the same data as a web browser would do.
If you don't want a general solution, but only one that works for you, there might be shortcut. If you look at that function again:
function validate_form(form) { if ( form.user_id.value == "" || form.password.value == "" ) { alert( "Enter a username and password." ); return false; } //short-cut if challenge/response is disabled. if ( !_useChallenge ) { form.encoded_pw.value = base64encode( form.password.value ); form.encoded_pw_unicode.value = b64_unicode( form.password.value ) +; form.password.value = ""; return true; } ... }
There seems to be a chance that the system accepts login without challenge/response, so all you have to do is to login once manually, and record the the values that are stored in form.encoded_pw_unicode and in the username field, and then uses this data each time you want to log in.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How to login to a form which has Javascript OnSubmit method usirng Perl
by ragas (Initiate) on Nov 05, 2007 at 17:35 UTC |