#!/bin/sh
# get a list of macs amd manufacturers
#
[ ! -e /opt/sark/www/sark-common/manuf.txt ] && touch /opt/sark/www/sark-common/manuf.txt
chown www-data:www-data /opt/sark/www/sark-common/manuf.txt
curl -L -s "https://gitlab.com/wireshark/wireshark/-/raw/master/manuf" > /tmp/manuf.txt
if [ -s /tmp/manuf.txt ]; then
diff /opt/sark/www/sark-common/manuf.txt /tmp/manuf.txt
if [ "$?" -ne "0" ] ; then
mv /tmp/manuf.txt /opt/sark/www/sark-common/manuf.txt
logger SARKgetmaclist - updated manufacturer MAC DB
else
logger SARKgetmaclist - manufacturer MAC DB up to date
fi
else
logger SARKgetmaclist - **** Could not fetch new manufacturer MAC DB ****
fi
sudo sh /opt/sark/scripts/getmaclist.sh
Quote from: sysadmin on September 09, 2021, 07:22:27 PMThe BLF template setting has been exposed in 6.2.0-18. The 6.2 installation procedure has changed and I will post a write-up in the main wiki showing how to install it.Anything further on the availability of the 6.2.0-18 release and the write-up on the change in installation procedure? Thank you.
public function request_syscmd ($data) {
//establish connection to the daemon
$fp = fsockopen( "127.0.0.1", 7601, $errno, $errdesc, 1)
or die("Connection to 127.0.0.1:7601 failed");
$ret = null;
// read the ack sent by server.
$ack[] = fgets($fp, 8192);
$this->logit(" request_syscmd sending -> $data", 5 );
fputs($fp, "$data\n");
// while( ! preg_match(' /EOT/ ',$ret)) {
while (1) {
$ret .= fgets($fp, 8192);
if ( ! preg_match(' /EOT/ ',$ret)) {
break;
}
}
fclose($fp);
return ($ret);
}