Interfaccia gestione ACL

This commit is contained in:
cmaffio
2016-04-29 16:48:15 +02:00
parent a2b8b5b37f
commit 4dea08e88c
4 changed files with 145 additions and 10 deletions

View File

@@ -9,7 +9,7 @@ require "$Bin/../script/conntrack.conf";
local $SIG{ALRM} = sub {
my $time = localtime; # scalar context
print LOG "$$ - $time - Exit\n";
#print LOG "$$ - $time - Exit\n";
exit 1;
};
@@ -21,8 +21,8 @@ my $dbmysql = DBI->connect("DBI:mysql:;host=$DBhost", $DBuser, $DBpass) or die (
$sts = $dbmysql->prepare("use $DBname");
$sts->execute ();
open LOG, ">> /srv/www/htdocs/pannello_vbc/proxy/squid_acl/squid_pool.log";
LOG->autoflush(1);
#open LOG, ">> /srv/www/htdocs/pannello_vbc/proxy/squid_acl/squid_pool.log";
#LOG->autoflush(1);
alarm $timeout;
while($limit) {
@@ -38,7 +38,7 @@ while($limit) {
$query = "SELECT id FROM proxy_src WHERE ip = '".$param[1]."' AND attivo = 1";
@reply = ("OK\n", "ERR\n");
my $time = localtime; # scalar context
print LOG "$$ - $time - $limit - $input -\n";
#print LOG "$$ - $time - $limit - $input -\n";
$limit--;
alarm $timeout;
}
@@ -46,7 +46,7 @@ while($limit) {
$query = "SELECT id FROM proxy_utenti WHERE user = '".$param[1]."' AND pass = PASSWORD('".$param[2]."') AND attivo = 1";
@reply = ("OK\n", "ERR\n");
my $time = localtime; # scalar context
print LOG "$$ - $time - $limit - $input -\n";
#print LOG "$$ - $time - $limit - $input -\n";
$limit--;
alarm $timeout;
}