Subversion Repositories ALCASAR

Compare Revisions

No changes between revisions

Ignore whitespace Rev 2964 → Rev 2965

/alcasar.sh
2190,10 → 2190,6
echo "LDAP_CERT_REQUIRED=" >> $CONF_FILE
echo "SMS=off" >> $CONF_FILE
echo "SMS_NUM=" >> $CONF_FILE
echo "## MULTIWAN : WANx=@IPx,Weightx" >> $CONF_FILE
echo "MULTIWAN=off" >> $CONF_FILE
echo "#WAN1=\"192.168.0.250,1\"" >> $CONF_FILE
echo "#WAN2=\"192.168.0.251,1\"" >> $CONF_FILE
echo "BL_PUREIP=on" >> $CONF_FILE
echo "BL_SAFESEARCH=off" >> $CONF_FILE
echo "WL_SAFESEARCH=off" >> $CONF_FILE
2200,6 → 2196,7
echo "IOT_CAPTURE=off" >> $CONF_FILE
echo "WIFI4EU=off" >> $CONF_FILE
echo "WIFI4EU_CODE=123e4567-e89b-12d3-a456-426655440000" >> $CONF_FILE
echo "MULTIWAN=Off" >> $CONF_FILE
# Prompt customisation (colors)
[ -e /etc/bashrc.default ] || cp /etc/bashrc /etc/bashrc.default
cp -f $DIR_CONF/bashrc /etc/. ; chmod 644 /etc/bashrc ; chown root:root /etc/bashrc
/conf/sudoers
13,7 → 13,7
User_Alias SMS=gammu_smsd # gammu-smsd owner
 
# Cmnd alias specification
Cmnd_Alias NET=/sbin/ip,/sbin/arping,/sbin/arp,/usr/sbin/tcpdump,/usr/local/bin/alcasar-watchdog.sh,/usr/local/bin/alcasar-dhcp.sh,/usr/local/bin/alcasar-dns-local.sh,/usr/local/bin/alcasar-network.sh # network commands
Cmnd_Alias NET=/sbin/ip,/sbin/arping,/sbin/arp,/usr/sbin/tcpdump,/usr/local/bin/alcasar-watchdog.sh,/usr/local/bin/alcasar-dhcp.sh,/usr/local/bin/alcasar-dns-local.sh,/usr/local/bin/alcasar-network.sh,/usr/local/bin/alcasar-list-ip_gw.sh # network commands
Cmnd_Alias URPMI=/usr/sbin/urpmi,/usr/sbin/urpmi.update # packages managment
Cmnd_Alias BYPASS=/usr/local/bin/alcasar-bypass.sh # authentication bypass
Cmnd_Alias RADDB=/usr/bin/radwho,/usr/sbin/chilli_query # manage users in command line
/scripts/alcasar-condown.sh
9,6 → 9,7
# This script is started by coova after each logout
# Ce script est lancé par coova à chaque déconnexion d'usager
 
CONF_FILE="/usr/local/etc/alcasar.conf"
PASSWD_FILE="/root/ALCASAR-passwords.txt"
DB_USER=`cat $PASSWD_FILE|grep ^db_user=|cut -d'=' -f2`
DB_PASSWORD=`cat $PASSWD_FILE|grep ^db_password=|cut -d'=' -f2`
/scripts/alcasar-list-ip_gw.sh
0,0 → 1,21
#!/bin/sh
#
# $Id: alcasar-conup.sh 2886 2020-11-23 22:50:01Z rexy $
#
# alcasar-list-users.sh
# by Rexy
# This script is distributed under the Gnu General Public License (GPL)
 
# This script displays authenticated systems (users & @MAC) with their gw
# Ce script affiche les systèmes authentifiés (utilisateurs et @MAC) avec leur routeur
 
CONF_FILE="/usr/local/etc/alcasar.conf"
 
nb_gw=`grep ^WAN $CONF_FILE | wc -l`
for (( i = 0 ; i <= $nb_gw ; i++ ));do
gw="gw$i"
ip_list=`ipset l $gw|grep -v :`
for ip in $ip_list;do
echo "$ip $gw"
done
done
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
+*
\ No newline at end of property
/web/acc/manager/htdocs/activity.php
29,8 → 29,11
fclose($file_conf);
 
$tmp = explode("/",$conf["PRIVATE_IP"]);
$private_ip=$tmp[0];
$intif = $conf["INTIF"];
$private_ip=$tmp[0];
if ($conf['MULTIWAN'] !== 'Off') {
exec ('sudo /usr/local/bin/alcasar-list-ip_gw.sh', $list_ip_gw);
}
require('/etc/freeradius-web/config.php');
# Choice of language
$Language = 'en';
56,6 → 59,7
$l_captureon = "Autoriser et capturer";
$l_captureoff = "Arrêter la capture";
$l_captureonly_on = "Capturer";
$l_gw = "Routeur";
} else if ($Language === 'es') {
$l_activity = "Actividad en la LAN";
$l_ip_adr = "Dirección IP";
74,6 → 78,7
$l_captureon = "Autorizar y capturar";
$l_captureoff = "Detener la captura";
$l_captureonly_on = "Captura";
$l_gw = "Router";
} else {
$l_activity = "Activity on the consultation LAN";
$l_ip_adr = "IP Address";
92,6 → 97,7
$l_captureon = "Authorize and capture";
$l_captureoff = "Stop capture";
$l_captureonly_on = "Capture";
$l_gw = "Router";
}
function taille_fichier($fichier)
{
158,8 → 164,11
<th><?= $l_mac_adr ?></th>
<th><?= $l_user ?></th>
<th><?= $l_action ?></th>
</tr>
<?php
<?php
if ($conf['MULTIWAN'] !== 'Off') {
echo "<th>$l_gw</th>";
}
echo "</tr>";
$IoT_capture = $conf["IOT_CAPTURE"];
$output = array(); $detail = array(); $nb_ligne = 0;
exec("sudo /sbin/ip link show ".escapeshellarg($intif), $output); // retrieve ALCASAR MAC address
287,6 → 296,19
}
echo "</FORM></TD>";
}
if ($conf['MULTIWAN'] !== 'Off') {
if ($detail[4] == "1"){ // authenticated equipment
while (list(,$ligne2) = each($list_ip_gw)){
$detail2 = explode (" ", $ligne2);
if ($detail2[0] == $detail[1]){
echo "<td>$detail2[1]</td>";
break;}
}
}
else {
echo "<td> </td>";
}
}
unset ($mac_in_ether_file);
echo "</tr>";
}