Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 345 → Rev 346

/web/acc/admin/auth_exceptions.php
42,8 → 42,8
case 'MAJ_UAMALLOWED' :
$nb_domain=0;
$tab_domains = explode ("\n", $_POST['trusted_domains']);
$fichier=fopen("/etc/chilli/alcasar-uamdomain","w+");
fputs ($fichier, "HS_UAMDOMAINS=\"");
$fichier=fopen("/usr/local/etc/alcasar-uamdomain","w+");
fputs ($fichier, "uamdomain=\"");
foreach ($tab_domains as $domain ){
$tr_domain=trim($domain);
$nb_domain++;
52,14 → 52,14
else fputs ($fichier, $tr_domain);
}
}
fputs ($fichier, "\"");
fputs($fichier, "\"");
fclose($fichier);
unset($_POST['trusted_domains']);
unset($nb_domain);
$nb_url=0;
$tab_urls = explode ("\n", $_POST['trusted_urls']);
$fichier=fopen("/etc/chilli/alcasar-uamallowed","w+");
fputs ($fichier, "HS_UAMALLOW=\"");
$fichier=fopen("/usr/local/etc/alcasar-uamallowed","w+");
fputs ($fichier, "uamallowed=\"");
foreach ($tab_urls as $url ){
$tr_url=trim($url);
$nb_url++;
68,7 → 68,7
else fputs ($fichier, $tr_url);
}
}
fputs ($fichier, "\"");
fputs($fichier, "\"");
fclose($fichier);
unset($_POST['trusted_urls']);
unset($nb_url);
78,8 → 78,8
case 'MAJ_MACALLOWED' :
$nb_mac=0;
$tab_macs = explode ("\n", $_POST['trusted_macs']);
$fichier=fopen("/etc/chilli/alcasar-macallowed","w+");
fputs ($fichier, "HS_MACALLOW=\"");
$fichier=fopen("/usr/local/etc/alcasar-macallowed","w+");
fputs ($fichier, "macallowed=\"");
foreach ($tab_macs as $macs ){
$tr_macs=trim($macs);
$nb_mac++;
88,7 → 88,7
else fputs ($fichier, $tr_macs);
}
}
fputs ($fichier, "\"");
fputs($fichier, "\"");
fclose($fichier);
unset($_POST['trusted_macs']);
unset($nb_mac);
117,7 → 117,7
exemple2 : domain2.net<BR>
<?php
echo "<textarea name='trusted_domains' rows=5 cols=40>";
$trusted_domains_file="/etc/chilli/alcasar-uamdomain";
$trusted_domains_file="/usr/local/etc/alcasar-uamdomain";
$ouvre=fopen($trusted_domains_file,"r");
if ($ouvre)
{
124,10 → 124,10
while (!feof ($ouvre))
{
$tampon = fgets($ouvre, 4096);
$domains = substr($tampon,15,-1);
$tab_domains = explode (",", $domains);
$domain_list = substr($tampon,11,-1);
$tab_domains = explode (",", $domain_list);
foreach ($tab_domains as $domain ){
if ($domain != "\"") echo $domain."\n";
if ($domain) { echo $domain."\n";}
}
}
}
144,7 → 144,7
exemple2 : domain4.org/~polux/index.html<BR>
<?php
echo "<textarea name='trusted_urls' rows=5 cols=40>";
$trusted_urls_file="/etc/chilli/alcasar-uamallowed";
$trusted_urls_file="/usr/local/etc/alcasar-uamallowed";
$ouvre=fopen($trusted_urls_file,"r");
if ($ouvre)
{
151,10 → 151,10
while (!feof ($ouvre))
{
$tampon = fgets($ouvre, 4096);
$urls = substr($tampon,13,-1);
$urls = substr($tampon,12,-1);
$tab_urls = explode (",", $urls);
foreach ($tab_urls as $url ){
if ($url != "\"") echo $url."\n";
if ($url) echo $url."\n";
}
}
}
190,7 → 190,7
exemple : 12-2f-36-a4-df-43<BR>
<?php
echo "<textarea name='trusted_macs' rows=5 cols=40>";
$trusted_macs_file="/etc/chilli/alcasar-macallowed";
$trusted_macs_file="/usr/local/etc/alcasar-macallowed";
$ouvre=fopen($trusted_macs_file,"r");
if ($ouvre)
{
197,10 → 197,10
while (!feof ($ouvre))
{
$tampon = fgets($ouvre, 4096);
$macs = substr($tampon,13,-1);
$macs = substr($tampon,12,-1);
$tab_macs = explode (",", $macs);
foreach ($tab_macs as $macs ){
if ($macs != "\"") echo $macs."\n";
if ($macs) echo $macs."\n";
}
}
}
/web/index-access-deny.php
10,25 → 10,23
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'fr'){
$l_access_denied = "ACC&Egrave;S REFUS&Eacute;";
$l_access_controled = "ACC&Egrave;S CONTR&Ocirc;L&Eacute;";
$l_required_domain = "Site WEB demand&eacute;";
$l_explain = "Vous tentez d'acc&eacute;der &agrave; une ressource dont le contenu est r&eacute;put&eacute; contenir des informations inappropri&eacute;es.";
$l_contact = "Contactez le responsable de la s&eacute;curit&eacute; (OSSI/RSSI) si vous pensez que ce filtrage est abusif.";
$l_welcome = "Bienvenue sur le portail captif ALCASAR.<br>Vous pouvez : ";
$l_welcome = "Bienvenue sur la page d'accueil du portail.<br>Actions possibles : ";
$l_acc_access = "<a href=\"https://$private_ip/acc\">Acc&eacute;der au centre de gestion (ALCASAR Control Center)</A>";
$l_logout = "<a href=\"http://$private_ip:3990/logoff\">Vous d&eacute;connecter si votre session est ouverte</A>";
$l_internet_access = "<a href=\"https://$private_ip/intercept.php\">Tester l'interception de l'acc&egrave;s &agrave; Internet</A>";
$l_password_change = "<a href=\"https://$private_ip/pass\">Changer votre mot de passe</A>";
}
else {
$l_access_denied = "ACCESS DENIED";
$l_access_controled = "ACCESS CONTROLED";
$l_required_domain = "Required WEB site";
$l_explain = "Your portal has just detected that the Internet access is down";
$l_contact = "Contact your Internet provider responsive for more information";
$l_welcome = "Welcome on the captive portal ALCASAR.<br>You can connect: ";
$l_acc_access = "<a href=\"https://$private_ip/acc\">to the ALCASAR Control Center (ACC)</A>";
$l_welcome = "Welcome on the captive portal ALCASAR.<br>Possible actions : ";
$l_acc_access = "<a href=\"https://$private_ip/acc\">go to the ALCASAR Control Center (ACC)</A>";
$l_logout = "<a href=\"http://$private_ip:3990/logoff\">Logoff if your session is open</A>";
$l_internet_access = "<a href=\"https://$private_ip/intercept.php\">Internet intercept page for Test</A>";
$l_paasword_change = "<a href=\"https://$private_ip/pass\">Change your password</A>";
}
?>
<head>
42,13 → 40,13
<tr>
<td colspan=2 bgcolor=#FEA700 height=100 align=center>
<font face=arial,helvetica size=6>
<? if ($direct_access == "true"){echo "<b>$l_access_controled</b>";} else {echo "<b>$l_access_denied</b>";}?>
<? if ($direct_access == "true"){echo "<img height=\"90\" src=\"images/titre-alcasar.png\">";} else {echo "<b>$l_access_denied</b>";}?>
</td>
</tr>
<tr>
<td colspan=2 bgcolor=#FFFACD height=30 align=right>
<font face=arial,helvetica size=3 color=black>
<b><? echo "$l_required_domain : $_SERVER[HTTP_HOST]";?></b>
<b><? if ($direct_access != "true"){echo "$l_required_domain : $_SERVER[HTTP_HOST]";}?></b>
</td>
</tr>
<tr>
61,7 → 59,7
<font size=3>
<?
if ($direct_access == "true"){
echo "<center>$l_welcome</center> <br><li> $l_acc_access <li> $l_logout <li> $l_internet_access";}
echo "<center>$l_welcome</center> <br> <li> $l_logout <li> $l_password_change <li> $l_acc_access";}
else {echo "$l_explain <br><br> $l_contact";}
?>
</td>