57,7 → 57,7 |
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){ |
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']); |
$Language = strtolower(substr(chop($Langue[0]),0,2)); } |
$redirect_link = "www.euronews.com"; # beware !!! HTTP only |
$redirect_link = "www.euronews.com"; # Default redirection for HTTPS interception (beware, this website must run in HTTP) |
|
# Retrieve the user info behind the remote ip |
exec ("sudo /usr/sbin/chilli_query list|grep $remote_ip" , $tab); |
108,23 → 108,20 |
else # user not connected |
{ |
exec("sudo /usr/sbin/ipset list not_auth_yet | grep $remote_ip | wc -l 2>&1", $ipset_not_auth_yet); |
if(!$direct_access && $ipset_not_auth_yet[0] == '0') # it's the fist stage of an interception |
if(!$direct_access && $ipset_not_auth_yet[0] == '0') # it's the first stage of the interception |
{ |
$display_menu = True; # Display menu for user not_auth_yet |
$redirect_link = $_SERVER['HTTP_HOST']; # to keep the user URL |
if (!isset($_SERVER['HTTPS'])) # In HTTP, the user is redirected on it's home page. In HTTPS, it's on the default page |
{ |
$redirect_link = $_SERVER['HTTP_HOST']; # to keep the user URL |
} |
|
} |
if(isset($_GET['url'])) # it's the second stage (when user has clicked to open a connection ...) |
{ |
exec("sudo /usr/sbin/ipset add not_auth_yet $remote_ip"); # Add user in the ipset "not_auth_yet" (DNS requests not intercepted) |
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'off') # in HTTP, the user is redirected on it's home page (in HTiTPS, it's on the default page) |
{ |
$redirect_link = "http://".$_GET['url']; |
} |
else |
{ |
$redirect_link = "http://".$redirect_link; |
} |
header("Location: $redirect_link",TRUE,307); |
$redir = "http://".$_GET['url']; |
header("Location: $redir",TRUE,307); |
exit; |
} |
if ($ipset_not_auth_yet[0] == '1'){ #if user not_auth_yet still here (index.php), we force DNS resquest. |
260,7 → 257,7 |
$l_explain = ($direct_access ? $l_explain_acc_access : ($network_pb ? $l_explain_net_pb : $l_explain_access_deny)); |
|
# set the icons |
$img_rep = "./images/"; |
$img_rep = "/images/"; |
$img_organisme = "organisme.png"; |
$img_access = "globe_acces_70.png"; |
$img_connect = "globe_70.png"; |