Hon Shi wrote:

> Do these generate the same hash?
> The password fails every time.  

I'd start by printing out the content of $cat and ts.value and
see if they're the same (or similar since they'll be run at
different times).  If that looks OK, proceed to printing $pwhash
(at both places) and pwhash.value.

> Perl version:
> 
>   use Digetst::MD5 qw(md5);
>   $tm = time * 1000;
>   $cat = $password . $tm;
>   $pwhash = md5($cat);  # alternative tried md5($password, $tm);
>   $pwhash = uri_escape($pwhash);
> 
>   then post with 
> 
>   do_POST($url_login_post,
>       [ 'ts' => $tm,
>         'encrypw' => $pwhash,
>         'submit1' => 'Login',
>         'text1' => $user_id ]);
>   
> 
> Javascript version:
> 
> <script language="javascript" src"md5.js"></scripts>
> <script language="javascript">
> .
> .
> .
>   ts.value = date.getTime();
>   pwhash.value = calcMD5(password.value + ts.value);
>   fr.submit();
_______________________________________________
Perl-Win32-Web mailing list
Perl-Win32-Web@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to