#!/usr/bin/python3 # -*- coding: utf-8 -*- import mod_python from fonctions import baseHTML, connexionBD, lien def index(req): req.content_type="text/html" content=str() #sql part conn=connexionBD() cur=conn.cursor() sql="SELECT * FROM paquet ORDER BY heure DESC LIMIT 20;" sql_count="SELECT COUNT(*) FROM paquet;" cur.execute(sql) conn.commit() data=cur.fetchall() cur.execute(sql_count) conn.commit() count=cur.fetchone() count=str(count[0]) conn.close() #sql part #takes every lines from the select for i in data : content+=("""
Nombre totale de paquets : """+ count +"""
Heure | Protocole | IP Source | IP Destination | Port Source | Port Destination |
---|