Subversion Repositories ALCASAR

Rev

Rev 1670 | Rev 1948 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1670 Rev 1947
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: intercept.php 1670 2015-07-24 21:19:11Z richard $
2
# $Id: intercept.php 1947 2016-06-15 16:18:33Z raphael.pion $
3
#
3
#
4
# intercept.php for ALCASAR captive portal
4
# intercept.php for ALCASAR captive portal
5
# Copyright (C) 2003, 2004 Mondru AB.
5
# Copyright (C) 2003, 2004 Mondru AB.
6
# Modify by REXY & steweb57
6
# Modify by REXY & steweb57
7
# UI & css style by stephane ERARD
7
# UI & css style by stephane ERARD
Line 330... Line 330...
330
  case 'Your maximum never usage time has been reached' : $reply = $l_reply_6 ; break;
330
  case 'Your maximum never usage time has been reached' : $reply = $l_reply_6 ; break;
331
  }}
331
  }}
332
 
332
 
333
# If attempt to login
333
# If attempt to login
334
if ("$button" == "$l_boutonO") {
334
if ("$button" == "$l_boutonO") {
-
 
335
  #correction password length
-
 
336
  #http://www.stochasticgeometry.ie/2009/09/09/maximum-password-length-in-coova-chilli/
335
  $hexchal = pack ("H32", $challenge);
337
  $hexchal = pack ("H*", $challenge);
336
  $newchal = pack ("H*", md5($hexchal . $uamsecret));
338
  $newchal = pack ("H*", md5($hexchal . $uamsecret));
-
 
339
 
-
 
340
  while (strlen($newchal) < strlen($password)){
-
 
341
                       $newchal .= $newchal;
-
 
342
  }
-
 
343
 
337
  $response = md5("\0" . $password . $newchal);
344
  $response = md5("\0" . $password . $newchal);
338
  $newpwd = pack("a32", $password);
345
  $newpwd = pack("a*", $password);
339
  $pappassword = implode ("", unpack("H32", ($newpwd ^ $newchal)));
346
  $pappassword = implode ("", unpack("H*", ($newpwd ^ $newchal)));
340
  echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
347
  echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
341
<html>
348
<html>
342
<head>
349
<head>
343
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
350
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
344
  <title>$l_loggingin</title>
351
  <title>$l_loggingin</title>