I am currently trying to automatically log in to the website below using perl. I have tried using mechanize but I believe it would require JS functionality. Ive looked into the JavaScricpt Mech Plugin but the documentation is not very understandable for me. Im not sure how to further approach this since I cant see the md5() function so Im not able to reconstruct it in the perl code...
The relevant bits are:
HTML:
<form method="POST" name="logonForm" onsubmit="encode();document.submitForm.submit();return false;">
<tr class="Element">
<td class="text" id="ID_Text4"><nobr>User name:</nobr></td>
<td class="text" align="left">
<select name="username" style="width:125">
<option value="user" id="ID_Text5">user </option>
<option selected value="admin" id="ID_Text6">admin </option>
</select>
</td>
</tr>
<tr class="Element">
<td class="text" id="ID_Text7"><nobr>Password:</nobr></td>
<td class="text">
<input type="password" size="10" name="password" style="width:125">
</td>
</tr>
<form method="POST" name="submitForm">
<input type="hidden" name="encoded">
<input type="hidden" name="nonceA" value="">
<input type="button" name="goto" value="Log On" onClick="encode();submit();" style="width:125" ID="ID_Button1">
<input type="hidden" name="URL" value="/">
JS:
function encode()
{
// sets the hidden field value to whatever md5 returns.
document.submitForm.encoded.value = document.logonForm.username.value + ":" + md5(document.logonForm.username.value + ":" + document.logonForm.password.value + ":" + document.submitForm.nonceA.value);
/* Dont used */
document.submitForm.URL.disabled = true;
}