migration de la base sur rouge
darcs-hash:20051001111944-6d78a-5a3f0ad35992b3f436066992109a288e52627b4c.gz
This commit is contained in:
parent
a1f93da9b5
commit
94f8855b9a
1 changed files with 7 additions and 7 deletions
|
@ -15,7 +15,7 @@ import iptools
|
|||
from pyPgSQL import PgSQL
|
||||
import re
|
||||
from time import gmtime,strftime
|
||||
sys.path.append('/home/bernat')
|
||||
sys.path.append('/usr/script/surveillance')
|
||||
import strptime
|
||||
|
||||
# Définition de constantes :
|
||||
|
@ -24,7 +24,7 @@ reseau = ["138.231.136.0/21", "138.231.148.0/22"]
|
|||
|
||||
# Ouverture de la base de données :
|
||||
###################################
|
||||
pgsql = PgSQL.connect(host='/var/run/postgresql', database='filtrage', user='crans')
|
||||
pgsql = PgSQL.connect(host='/var/run/postgresql', database='filtrage', user='crans',host='rouge.adm.crans.org')
|
||||
pgsql.autocommit = True
|
||||
|
||||
|
||||
|
@ -81,7 +81,7 @@ for log in filtre :
|
|||
|
||||
if resultat_p2p :
|
||||
ip_src = resultat_p2p.group(3)
|
||||
verif = iptools.AddrInNets (actuel["ip_src"],reseau)
|
||||
verif = iptools.AddrInNets (ip_src,reseau)
|
||||
if verif :
|
||||
date = resultat_p2p.group(1)
|
||||
id_p2p = int(protocole_p2p[resultat_p2p.group(2)])
|
||||
|
@ -101,8 +101,8 @@ for log in filtre :
|
|||
# On teste si le log contient des virus
|
||||
########################################
|
||||
elif resultat_virus :
|
||||
ip_src = resultat_p2p.group(3)
|
||||
verif = iptools.AddrInNets (actuel["ip_src"],reseau)
|
||||
ip_src = resultat_virus.group(3)
|
||||
verif = iptools.AddrInNets (ip_src,reseau)
|
||||
if verif :
|
||||
date = resultat_virus.group(1)
|
||||
ip_src = resultat_virus.group(3)
|
||||
|
@ -119,8 +119,8 @@ for log in filtre :
|
|||
|
||||
|
||||
elif resultat_flood :
|
||||
ip_src = resultat_p2p.group(3)
|
||||
verif = iptools.AddrInNets (actuel["ip_src"],reseau)
|
||||
ip_src = resultat_flood.group(3)
|
||||
verif = iptools.AddrInNets (ip_src,reseau)
|
||||
if verif :
|
||||
date = resultat_flood.group(1)
|
||||
ip_src = resultat_flood.group(3)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue