Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1946 → Rev 1947

/web/intercept.php
332,11 → 332,18
 
# If attempt to login
if ("$button" == "$l_boutonO") {
$hexchal = pack ("H32", $challenge);
#correction password length
#http://www.stochasticgeometry.ie/2009/09/09/maximum-password-length-in-coova-chilli/
$hexchal = pack ("H*", $challenge);
$newchal = pack ("H*", md5($hexchal . $uamsecret));
 
while (strlen($newchal) < strlen($password)){
$newchal .= $newchal;
}
 
$response = md5("\0" . $password . $newchal);
$newpwd = pack("a32", $password);
$pappassword = implode ("", unpack("H32", ($newpwd ^ $newchal)));
$newpwd = pack("a*", $password);
$pappassword = implode ("", unpack("H*", ($newpwd ^ $newchal)));
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<html>
<head>