/web/acc/about.htm |
---|
19,13 → 19,13 |
</div> |
<CENTER><H2>A.L.C.A.S.A.R</H2> |
<H3> |
Application Libre pour le Contrôle Authentifié et Sécurisé des Accès au Réseau |
Application Libre pour le Contrôle Authentifié et Sécurisé des Accès au Réseau |
</H3></CENTER> |
<script LANGUAGE="javascript"> |
//Fonction pour ouvrir une nouvelle fenêtre |
function ouvrir(page) |
{ |
window.open(page, "From Rexy74", "alwaysRaised=yes,toolbar=yes,location=yes,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=no,copyhistory=no,hotkeys=no,width=640 ,height=480"); |
window.open(page, "From Rexy", "alwaysRaised=yes,toolbar=yes,location=yes,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=no,copyhistory=no,hotkeys=no,width=640 ,height=480"); |
} |
//Code d'animation |
/* On récupère les 3 calques */ |
73,22 → 73,22 |
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> |
<TABLE width="100%" border="1" cellspacing="0" cellpadding="0"> |
<TR> |
<TD align="center"><A HREF=javascript:ouvrir("http://www.linux.org")><img border="0" src="/images/footer_linux.png"></A></TD> |
<TD align="center"><A HREF=javascript:ouvrir("http://www.mageia.org")><img border="0" src="/images/footer_mageia.png"></A></TD> |
<TD align="center"><A HREF=javascript:ouvrir("http://www.coova.org/CoovaChilli")><img border="0" src="/images/footer_coova.png"></A></TD> |
<TD align="center"><A HREF=javascript:ouvrir("http://www.freeradius.org")><img border="0" src="/images/footer_freeradius.png"></A></TD> |
<TD align="center"><A HREF=javascript:ouvrir("http://www.mysql.com")><img border="0" src="/images/footer_mysql.png"></A></TD> |
<TD align="center"><A HREF=javascript:ouvrir("http://www.apache.org")><img border="0" src="/images/footer_apache.png"></A></TD> |
<TD align="center"><A HREF=javascript:ouvrir("http://www.php.net")><img border="0" src="/images/footer_php.png"></A></TD> |
<TD align="center"><A HREF="javascript:ouvrir('http://www.linux.org')"><img border="0" src="/images/footer_linux.png"></A></TD> |
<TD align="center"><A HREF="javascript:ouvrir('http://www.mageia.org')"><img border="0" src="/images/footer_mageia.png"></A></TD> |
<TD align="center"><A HREF="javascript:ouvrir('http://www.coova.org/CoovaChilli')"><img border="0" src="/images/footer_coova.png"></A></TD> |
<TD align="center"><A HREF="javascript:ouvrir('http://www.freeradius.org')"><img border="0" src="/images/footer_freeradius.png"></A></TD> |
<TD align="center"><A HREF="javascript:ouvrir('http://www.mariadb.org')"><img border="0" src="/images/footer_mariadb.png"></A></TD> |
<TD align="center"><A HREF="javascript:ouvrir('http://www.apache.org')"><img border="0" src="/images/footer_apache.png"></A></TD> |
<TD align="center"><A HREF="javascript:ouvrir('http://www.php.net')"><img border="0" src="/images/footer_php.png"></A></TD> |
</TR> |
<TR> |
<TD align="center"><A HREF=javascript:ouvrir("http://www.gnupg.org")><img border="0" src="/images/footer_gnupg.png"></A></TD> |
<TD align="center"><A HREF=javascript:ouvrir("http://awstats.sourceforge.net")><img border="0" src="/images/footer_awstats.png"></A></TD> |
<TD align="center"><A HREF=javascript:ouvrir("http://firewalleyes.creabilis.com")><img border="0" src="/images/footer_firewalleyes.png"></A></TD> |
<TD align="center"><A HREF=javascript:ouvrir("http://www.netfilter.org")><img border="0" src="/images/footer_netfilter.png"></A></TD> |
<TD align="center"><A HREF=javascript:ouvrir("http://www.squid-cache.org")><img border="0" src="/images/footer_squid.png"></A></TD> |
<TD align="center"><A HREF=javascript:ouvrir("http://dansguardian.org")><img border="0" src="/images/footer_dansguardian.png"></A></TD> |
<TD align="center"><A HREF=javascript:ouvrir("http://thekelleys.org.uk/dnsmasq/doc.html")><img border="0" src="/images/footer_dnsmasq.png"></A></TD> |
<TD align="center"><A HREF="javascript:ouvrir('http://www.gnupg.org')"><img border="0" src="/images/footer_gnupg.png"></A></TD> |
<TD align="center"><A HREF="javascript:ouvrir('https://sourceforge.net/projects/ipt-netflow')"><img border="0" src="/images/footer_netflow.png"></A></TD> |
<TD align="center"><A HREF="javascript:ouvrir('http://firewalleyes.creabilis.com')"><img border="0" src="/images/footer_firewalleyes.png"></A></TD> |
<TD align="center"><A HREF="javascript:ouvrir('http://www.netfilter.org')"><img border="0" src="/images/footer_netfilter.png"></A></TD> |
<TD align="center"><A HREF="javascript:ouvrir('http://www.squid-cache.org')"><img border="0" src="/images/footer_squid.png"></A></TD> |
<TD align="center"><A HREF="javascript:ouvrir('http://dansguardian.org')"><img border="0" src="/images/footer_dansguardian.png"></A></TD> |
<TD align="center"><A HREF="javascript:ouvrir('http://thekelleys.org.uk/dnsmasq/doc.html')"><img border="0" src="/images/footer_dnsmasq.png"></A></TD> |
</TR> |
</TABLE> |
</BODY> |
/web/acc/admin/protocols_filter2.php |
---|
File deleted |
/web/acc/admin/network.php |
---|
304,6 → 304,7 |
<tr><th><?php echo $l_network_title; ?></th></tr> |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr> |
</table> |
<? echo "<form action=".$_SERVER['PHP_SELF']." method='post'>";?> |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1> |
<tr><td valign="middle" align="left"> |
<fieldset> |
318,7 → 319,6 |
<table> |
<tr><td><?php echo $l_ip_public." : ".$IP_PUB;?></td></tr> |
<?php |
echo "<form action=".$_SERVER['PHP_SELF']." method='post'>"; |
echo "<tr><td>".$l_ip_dns1." <input style='width:120px' type='text' name='dns1' value=".$conf["DNS1"]."/></td></tr>"; |
echo "<tr><td>".$l_ip_dns2." <input style='width:120px' type='text' name='dns2' value=".$conf["DNS2"]."/></td></tr>"; |
?> |
329,7 → 329,6 |
<legend><?php echo $conf["EXTIF"].$l_extif_legend; ?></legend> |
<table> |
<?php |
echo "<form action=".$_SERVER['PHP_SELF']." method='post'>"; |
echo "<tr><td>".$l_ip_address." <input style='width:150px' type='text' name='ip_public' value=".$conf['PUBLIC_IP']."/></td></tr>"; |
echo "<tr><td>".$l_ip_router." <input style='width:120px' type='text' name='ip_gw' value=".$conf['GW']."/></td></tr>"; |
?> |
340,17 → 339,16 |
<legend><?php echo $conf["INTIF"].$l_intif_legend; ?></legend> |
<table> |
<?php |
echo "<form action=".$_SERVER['PHP_SELF']." method='post'>"; |
echo "<tr><td>".$l_ip_address."</td><td> <input style='width:150px' type='text' name='ip_private' value=".$conf['PRIVATE_IP']." /></td></tr>"; |
?> |
</table> |
</fieldset> |
</td></tr> |
<?php |
echo "<td><input type='submit' value='$l_apply' ></td>"; |
echo "</form>"; |
?> |
<tr><td colspan="3" align="center"> |
<?php echo "<input type='submit' value='$l_apply'>";?> |
</td></tr> |
</table> |
</form> |
<table width="100%" border="0" cellspacing="0" cellpadding="0"> |
<tr><th><?php echo $l_dhcp_title;?></th></tr> |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr> |
/web/acc/admin/protocols_filter.php |
---|
1,4 → 1,4 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<!DOCTYPE html "-//W3C//DTD HTML 4.01 Transitional//EN"> |
<HTML><!-- written by Rexy --> |
<HEAD> |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
6,7 → 6,6 |
<link rel="stylesheet" href="/css/style.css" type="text/css"> |
</HEAD> |
<body> |
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0> |
<? |
# Choice of language |
$Language = 'en'; |
15,25 → 14,20 |
$Language = strtolower(substr(chop($Langue[0]),0,2)); } |
if($Language == 'fr'){ |
$l_remove="Retirer de la liste"; |
$l_title_proto = "Filtrage de protocoles réseau"; |
$l_protocolsfilter="Vous pouvez personnaliser le profile de filtrage protocole 'personnalisable' ici. Vous pouvez ensuite l'attribuer à des utilisateurs via l'éditeur ou la création d'utilisateur."; |
$l_comment_on="À l'exclusion du WEB (port 80), les protocoles réseaux sont interdits.<BR>Choisissez ci-dessous les protocoles que vous autorisez"; |
$l_comment_off="(tous les protocoles réseau sont autorisés)"; |
$l_protocols="Protocoles autorisés"; |
$l_title_proto = "Filtrage prersonnalisée de protocoles réseau"; |
$l_comment="Définissez ici la liste personalisée de protocoles réseau filtrés. Vous pouvez ensuite l'attribuer à des utilisateurs lors de leur création ou modification."; |
$l_protocols="Protocoles autorisés"; |
$l_error_open_file="Erreur d'ouverture du fichier"; |
$l_port="Numéro de port"; |
$l_proto="Nom du protocole"; |
$l_enabled="Autorisé"; |
$l_add_to_list="Ajouter à la liste"; |
$l_enabled="Autorisé"; |
$l_add_to_list="Ajouter à la liste"; |
$l_save="Enregistrer les modifications"; |
} |
else { |
$l_remove="Remove from list"; |
$l_title_proto = "Network protocols filter"; |
$l_protocolsfilter="You can change your \"custom\" protocol filtering here. You can set it to a user from ACC (create user / edit user)"; |
$l_comment_on="(choose the authorized network protocols)"; |
$l_comment_on="Except for the WEB (port 80), all protocols are blocked.<BR>Choose in the list below, the protocols you want authorize"; |
$l_comment_off="(all the network protocols are allowed for authenticated users)"; |
$l_title_proto = "Custom network protocols filter"; |
$l_comment="You can custom the network protocol filtering here. You can assign it to a user (create/edit a user)"; |
$l_protocols="Authorize protocols"; |
$l_error_open_file="Error opening the file"; |
$l_port="Port number"; |
146,13 → 140,55 |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr> |
</table> |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0> |
<tr> |
<tr><td colspan="2" valign="middle" align="left"> |
<? echo "<CENTER>$l_comment</CENTER>";?> |
<tr><td valign="middle" align="center"> |
<form action='protocols_filter.php' method='POST'> |
<table cellspacing=2 cellpadding=3 border=1> |
<? |
echo "<td colspan=\"2\" valign=\"middle\" align=\"left\">"; |
echo "<CENTER><H3>$l_protocolsfilter_on</H3>$l_comment_on</CENTER>"; |
require ('protocols_filter2.php'); |
echo "<tr><th>$l_port<th>$l_proto<th>$l_enabled<th>$l_remove</tr>"; |
// Read and compute the protocols list |
$tab=file(SERVICES_LIST); |
if ($tab) # the file isn't empty |
{ |
foreach ($tab as $line) |
{ |
if (trim($line) != '') # the line isn't empty |
{ |
$proto=explode(" ", $line); |
$name_svc=trim($proto[0],"#"); |
echo "<tr><td>$proto[1]<td>$name_svc"; |
echo "<td><input type='checkbox' name='chk-$name_svc'"; |
// if the line is commented -> protocol is not allowed |
if (preg_match('/^#/',$line, $r)) { |
echo ">";} |
else { |
echo "checked>";} |
echo "<td>"; |
if ($name_svc != "icmp") { |
echo "<input type='checkbox' name='del-$name_svc'>";} |
else { |
echo " ";} |
echo "</tr>"; |
} |
} |
} |
?> |
</table> |
<input type='hidden' name='choix' value='change_port'> |
<input type='submit' value='<?echo"$l_save";?>'> |
</form></td><td valign='middle' align='center'> |
<form action='protocols_filter.php' method='POST'> |
<table cellspacing=2 cellpadding=3 border=1> |
<tr><th><?echo"$l_port<th>$l_proto"?></tr> |
<tr><td><input type='text' name='add_port' size='5'></td> |
<td><input type='text' name='add_proto' size='10'></td> |
<td><input type='hidden' name='choix' value='new_port'> |
<input type='submit' value='<?echo"$l_add_to_list";?>'></td> |
</tr></table> |
</form> |
</td></tr> |
</TABLE> |
</BODY> |
</HTML> |
/web/acc/admin/services.php |
---|
11,9 → 11,9 |
$l_filter_services = "Services de filtrage"; |
$l_opt_services = "Services optionnels"; |
$l_service_title = "Nom du service"; |
$l_service_start = "Démarrer"; |
$l_service_stop = "Arrêter"; |
$l_service_restart = "Redémarrer"; |
$l_service_start = "Démarrer"; |
$l_service_stop = "Arréter"; |
$l_service_restart = "Redémarrer"; |
$l_service_status = "Status"; |
$l_service_status_img_ok= "Démarré"; |
$l_service_status_img_ko= "Arrété"; |
201,7 → 201,6 |
</table> |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0> |
<tr align="center"><td><?php echo $l_service_status;?></td><td colspan="2"><?php echo $l_service_title;?></td><td colspan="3"><?php echo $l_service_action;?></td></tr> |
<TR align="center"> |
<?php foreach( $MainServiceStatus as $serviceName => $statusOK ) { ?> |
<tr> |
<?php if ($statusOK) { ?> |
219,7 → 218,6 |
<?php } ?> |
</tr> |
<?php } ?> |
</td></tr> |
</table> |
<table width="100%" border="0" cellspacing="0" cellpadding="0"> |
<tr><th><?php echo $l_filter_services; ?></th></tr> |
227,7 → 225,7 |
</table> |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0> |
<tr align="center"><td><?php echo $l_service_status;?></td><td colspan="2"><?php echo $l_service_title;?></td><td colspan="3"><?php echo $l_service_action;?></td></tr> |
<TR align="center"> |
<!-- <TR align="center"> --> |
<?php foreach( $FilterServiceStatus as $serviceName => $statusOK ) { ?> |
<tr> |
<?php if ($statusOK) { ?> |
245,7 → 243,6 |
<?php } ?> |
</tr> |
<?php } ?> |
</td></tr> |
</table> |
<table width="100%" border="0" cellspacing="0" cellpadding="0"> |
<tr><th><?php echo $l_opt_services; ?></th></tr> |
253,7 → 250,6 |
</table> |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0> |
<tr align="center"><td><?php echo $l_service_status;?></td><td colspan="2"><?php echo $l_service_title;?></td><td colspan="3"><?php echo $l_service_action;?></td></tr> |
<TR align="center"> |
<?php foreach( $OptServiceStatus as $serviceName => $statusOK ) { ?> |
<tr> |
<?php if ($statusOK) { ?> |
271,15 → 267,15 |
<?php } ?> |
</tr> |
<?php } ?> |
</td></tr> |
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0"> |
</table> |
<table width="100%" border="0" cellspacing="0" cellpadding="0"> |
<tr><th><? echo $l_stop_restart;?></th></tr> |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr> |
</TABLE> |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1> |
</table> |
<table width="100%" border=1 cellspacing=0 cellpadding=1> |
<tr><td valign="middle" align="left"> |
<FORM action="services.php" method=POST><b> |
<select name='choix'></b> |
<FORM action="services.php" method=POST> |
<select name='choix'> |
<option selected value="reboot"><?echo "$l_reboot";?> |
<option value="halt"><?echo "$l_halt";?> |
</select> |
286,6 → 282,6 |
<input type=submit value="<?echo "$l_execute";?>"> |
</FORM> |
</td></tr> |
</TABLE> |
</table> |
</body> |
</html> |
/web/acc/haut.php |
---|
1,17 → 1,15 |
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN//2.0"> |
<!-- Writen by Rexy --> |
<!-- fenetre "haut" --> |
<!-- ACC Top Window --> |
<HTML> |
<HEAD> |
<TITLE>Haut</TITLE> |
<!-- Fonctions JavaScript --> |
<TITLE>Top</TITLE> |
<SCRIPT LANGUAGE="JavaScript"> |
function ouvrir(page) |
{ |
window.open(page, "portail", "alwaysRaised=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,hotkeys=no,width=640 ,height=480"); |
} |
</script> |
<!-- fin javascript --> |
</SCRIPT> |
<?php |
# $Id$ |
// Access counter incrementation |
37,9 → 35,11 |
<link rel="stylesheet" href="/css/style.css" type="text/css"> |
</HEAD> |
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0"> |
<TD valign="top" align="left"><A HREF=javascript:ouvrir("about.htm")><IMG height="80" border="0" SRC="/images/logo-alcasar.png"f></A></TD> |
<TR> |
<TD valign="top" align="left"><A HREF="javascript:ouvrir('about.htm')"><IMG height="80" border="0" SRC="/images/logo-alcasar.png"></A></TD> |
<TD valign="top" align="center"><A HREF="http://www.alcasar.net" TARGET="_new"><IMG height="80" border="0" SRC="/images/titre-alcasar.png"></A></TD> |
<TD valign="top" align="right"><A HREF="admin/logo.php" TARGET="REXY2"><IMG height="80" border="0" SRC="/images/organisme.png"></A></TD> |
</TR> |
</TABLE> |
</BODY> |
</HTML> |
/web/acc/manager/htdocs/activity.php |
---|
3,11 → 3,11 |
<head> |
<META HTTP-EQUIV="Refresh" CONTENT="30"> |
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]"> |
<title>État du réseau</title> |
<title>Activity</title> |
<link rel="stylesheet" href="/css/style.css"> |
</head> |
<body> |
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0"> |
<table width="100%" border="0" cellspacing="0" cellpadding="0"> |
<? |
#retrieve IP_address of ALCASAR |
$alcasar_conf_file="/usr/local/etc/alcasar.conf"; |
62,11 → 62,9 |
$l_edit_user = "Edit user"; |
$l_connect = "Temporarily authorize"; |
} |
echo " |
<tr><th>$l_activity</th></tr> |
<tr bgcolor=\"#FFCC66\"><td><img src=\"/images/pix.gif\" width=\"1\" |
height=\"2\"></td></tr> |
</TABLE>"; |
echo "<tr><th>$l_activity</th></tr> |
<tr bgcolor=\"#FFCC66\"><td><img src=\"/images/pix.gif\" width=\"1\" height=\"2\"></td></tr> |
</table>"; |
if (isset($_POST['action'])){ |
switch ($_POST['action']){ |
case "$l_disconnect" : |
84,14 → 82,11 |
} |
} |
?> |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1> |
<tr><td valign="middle" align="left"> |
<center> |
<? echo "$l_refresh";?> |
<table border=1 width="80%" bordercolordark="#ffffe0" bordercolorlight="#000000" width="100%" cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top> |
<table width="100%" border=1 cellspacing=0 cellpadding=1> |
<tr><td valign="middle" align="center"><? echo "$l_refresh";?><br> |
<table border=1 width="80%" bordercolordark="#ffffe0" bordercolorlight="#000000" cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top> |
<tr bgcolor="#d0ddb0"> |
<? echo " |
<th>#</th> |
<? echo " <th>#</th> |
<th>$l_ip_adr</th> |
<th>$l_mac_adr</th> |
<th>$l_user</th> |
106,10 → 101,9 |
while (list(,$ligne) = each($output)){ |
$detail = explode (" ", $ligne); |
$nb_ligne ++; |
echo "<FORM action='".$_SERVER['PHP_SELF']."' method=POST>"; |
echo "<TR>"; |
echo "<TD>".$nb_ligne."</TD>"; |
echo "<TD>".$detail[1]."</TD>"; |
echo "<tr valign=\"middle\">"; |
echo "<td>".$nb_ligne."</td>"; |
echo "<td>".$detail[1]."</td>"; |
if(file_exists('/usr/share/arp-scan/ieee-oui.txt')) // for each device on LAN, retrieve the MAC manufacturer |
{ |
$oui_id = substr(str_replace("-","",$detail[0]),0,6); |
119,14 → 113,14 |
$mac_manufacturer[0] = "Unknown"; |
} |
echo "<TD>$detail[0] ($mac_manufacturer[0])</TD>"; |
echo "<td>$detail[0] ($mac_manufacturer[0])</td>"; |
unset($mac_manufacturer); |
} |
else |
{ |
echo "<TD>$detail[0]</TD>"; |
echo "<td>$detail[0]</td>"; |
} |
echo "<TD>"; |
echo "<td>"; |
if ($detail[4] == "1"){ // authenticated equipment |
$login = $detail[5]; |
unset ($found_users); unset ($cn); |
148,8 → 142,10 |
else { #MAC is temporarily allowed |
echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"$l_edit_user\">$l_mac_temporarily_allowed</a>"; |
echo "</td><td>"; |
echo "<FORM action='".$_SERVER['PHP_SELF']."' method=POST>"; |
echo "<INPUT type='hidden' name='mac_addr' value='$detail[0]'>"; |
echo "<INPUT type=submit name='action' value='$l_disconnect'>"; |
echo "</FORM></TD>"; |
} |
# Disable temporarily @MAC access |
} |
157,37 → 153,34 |
else { |
if ($cn != '-') { echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"$l_edit_user $detail[5]\">$detail[5] ($cn)</a>";} |
else { echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"$l_edit_user $detail[5]\">$detail[5]</a>";} |
echo "</TD>"; |
echo "<TD>"; |
echo "<FORM action='".$_SERVER['PHP_SELF']."' method=POST>"; |
echo "<INPUT type='hidden' name='mac_addr' value='$detail[0]'>"; |
echo "<INPUT type=submit name='action' value='$l_disconnect'>"; |
echo "</FORM></TD>"; |
} |
} |
# equipment without authenticated user |
else if (($detail[0] == $intif_mac_addr) || ($detail[1] == $private_ip)){ |
echo "ALCASAR system"; |
echo "</TD>"; |
echo "<TD>"; |
echo " "; |
echo "</TD>"; |
} |
else { |
echo " "; |
echo "</TD>"; |
echo "<TD>"; |
echo "<TD>"; |
echo "<FORM action='".$_SERVER['PHP_SELF']."' method=POST>"; |
# Dissociate user (... or other) who is not connected yet |
echo "<INPUT type='hidden' name='mac_addr' value='$detail[0]'>"; |
echo "<INPUT type='submit' name='action' value='$l_dissociate'>"; |
# Enable temporarily @MAC access |
echo "<INPUT type=submit name='action' value='$l_connect'>"; |
echo "</FORM></TD>"; |
} |
echo "</TR></FORM>"; |
echo "</tr>"; |
} |
?> |
</td></tr> |
</table> |
</td></tr> |
</table> |
/web/images/footer_awstats.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Property changes: |
Deleted: svn:mime-type |
-image/png |
\ No newline at end of property |
/web/images/footer_mysql.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Property changes: |
Deleted: svn:mime-type |
-image/png |
\ No newline at end of property |
/web/images/footer_mariadb.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/web/images/footer_netflow.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/web/index.php |
---|
476,14 → 476,19 |
echo " <span>$l_explain_net_pb</span>"; |
} |
} |
else{ |
else{ # the user is intercepted |
exec("sudo /usr/sbin/ipset list not_filtered | grep $remote_ip | wc -l 2>&1", $ipset_not_filtered); |
# if user is in "ipset_not_filtered" then he must refresh its dns cache (we are in the interception process) |
if ($ipset_not_filtered[0] == '1'){ |
echo "<script>window.location.reload(true)</script>"; # force DNS request |
} |
# if user need to be warned that someone reads his logs |
if(isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] == '1'){ |
if (isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] == '1'){ |
echo " |
<div id=\"cadre_titre\" class=\"titre_refus\"> |
<p id=\"acces_controle\" class=\"titre_refus\">$l_title_warn</p>"; |
} |
else{ |
else{ # the user is blacklisted (or whitelisted) |
echo " |
<div id=\"cadre_titre\" class=\"titre_refus\"> |
<p id=\"acces_controle\" class=\"titre_refus\">$l_title</p>"; |
605,12 → 610,14 |
if (($network_pb)&&(! $direct_access)) { |
echo " <span>Diagnostic : $diagnostic</span>"; |
} |
echo "</div>"; |
if($direct_access){ # display the admin logo (wheel) at the bottom right |
echo "<div id=\"corner\">"; |
echo "<div id=\"adm\" class=\"corn\">"; |
echo "<a href=\"https://$hostname/acc/\"><img src=\"$img_rep$img_adm\"></a>"; |
echo "</div>"; |
echo "</div>"; |
} |
?> |
</div> |
<div id="corner"> |
<div id="adm" class="corn"> |
<a href="https://<?php echo $hostname; ?>/acc/"><img src=<?php echo $img_rep.''.$img_adm; ?>></a> |
</div> |
</div> |
</body> |
</html> |
/web/status.php |
---|
39,31 → 39,27 |
fclose($ouvre); |
$organisme = $conf["ORGANISM"]; |
$remote_ip = ($_SERVER['REMOTE_ADDR']); |
$remote_ip = preg_match('#^([0-9]{1,3}\.){3}[0-9]{1,3}$#', $_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ""; |
$connection_history = ""; |
$nb_connection_history = 3; |
//On récupère le nom de connexion de la session active. on attend que chilli ait mis à jour ses tables |
// Wait for chilli (uptade its tables) |
sleep (1); |
// Retrieve user info in tab $user[] |
exec ("sudo /usr/sbin/chilli_query list | grep 'pass' | grep -Ew '($remote_ip)'" , $tab); |
if(isset($tab[0])) |
$user = explode (" ", $tab[0]); |
#### Affichage des 3 dernières connexions de $user[5] |
#### Time conversion |
function secondsToDuration($seconds = null){ |
if ($seconds == null) return ""; |
$temp = $seconds % 3600; |
$time[0] = ( $seconds - $temp ) / 3600 ; // hours |
$time[2] = $temp % 60 ; // seconds |
$time[1] = ( $temp - $time[2] ) / 60; // minutes |
return $time[0]." h ".$time[1]." m ".$time[2]." s"; |
} |
# Choice of language |
//reste quelques traductions à faire |
$Language = 'en'; |
264,18 → 260,15 |
$l_a_connection_time = "active connections on the network"; |
} |
// si on a pas d'accès à la bdd, la page s'affiche quand même correctement |
if (isset($user[5])){ |
// Retrieve the last connections |
if ((is_file("./acc/manager/lib/sql/drivers/mysql/functions.php"))&&(is_file("/etc/freeradius-web/config.php"))){ |
include_once("/etc/freeradius-web/config.php"); |
include_once("./acc/manager/lib/sql/drivers/mysql/functions.php"); |
$sql = "SELECT UserName, AcctStartTime, AcctStopTime, acctsessiontime FROM radacct WHERE UserName='$user[5]' ORDER BY AcctStartTime DESC LIMIT 0 , $nb_connection_history"; |
$link = @da_sql_pconnect($config); // on affiche pas les erreurs |
$link = @da_sql_pconnect($config); |
if ($link){ |
$res = @da_sql_query($link,$config,$sql); // on affiche pas les erreurs |
$res = @da_sql_query($link,$config,$sql); |
if ($res){ |
$a_connection = ""; $a_connected=0; $connection_history.= "<ul>"; |
while(($row = @da_sql_fetch_array($res,$config))){ |
295,17 → 288,22 |
$a_connection = $l_a_connection." ".$a_connected." ".$l_a_connection_time; } |
} |
} |
//store in a file user @IP who can join this page. |
// Retrieve first name & last name |
// $search = $login; $search_IN = 'username'; // is user in database ? |
// if (is_file("../lib/sql/find.php")) |
// include("../lib/sql/find.php"); |
// if (isset ($found_users)) // user is in database |
// { |
// if (is_file("../lib/sql/user_info.php")) //retrieve user info (especialy $cn) |
// include("../lib/sql/user_info.php"); |
// } |
// if (! isset ($cn)){ $cn='-';} |
//store the user @IP in a file (to test if he is still active). |
$filename='/var/tmp/havp/current_users.txt'; |
//change me avoid duplicate user @IP |
$change_me = 1; |
//check if filename exists |
$change_me = 1; //avoid duplicate user @IP |
if(file_exists($filename)){ |
$fichier = fopen($filename, "r"); |
$content = file($filename); |
//if file is empty, we put user @IP in it. |
if(empty($content)) |
{ |
file_put_contents($filename, $_SERVER['REMOTE_ADDR']); |
312,7 → 310,7 |
} |
else |
{ |
//if we found duplicate IP, it will not write user @IP in filename (set change_me = 0) |
// if we found duplicate IP, we will not write user @IP (just set change_me = 0) |
foreach($content as $line){ |
$line = preg_replace('/\s+/', '', $line); |
if($line == $_SERVER['REMOTE_ADDR']) |
319,24 → 317,19 |
{ |
$change_me = 0; |
} |
} |
//if user @IP does not exist, we will write it in filename |
// if user @IP does not exist, we write it |
if($change_me) |
{ |
file_put_contents($filename, $_SERVER['REMOTE_ADDR'].PHP_EOL , FILE_APPEND); |
} |
} |
} |
else |
{ |
//we create filename and we put user @IP in it. |
//we create filename and we write user @IP. |
file_put_contents($filename, $_SERVER['REMOTE_ADDR'].PHP_EOL); |
} |
} |
} |
?> |