#!/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() conn=connexionBD() cur=conn.cursor() sql="SELECT * FROM paquet ORDER BY heure DESC;" cur.execute(sql) conn.commit() data=cur.fetchall() conn.close() for i in data: content+=("""""" + """""" + str(i[1]) + """""" + """""" + str(i[2]) + """""" + """""" + str(i[3]) + """""" + """""" + lien('destination.py?ip=' + str(i[4]), str(i[4])) + """""" + """""" + str(i[5]) + """""" + """""" + str(i[6]) + """""" + """""") req.write(""" """ + content + """
HeureProtocoleIP SourceIP DestinationPort SourcePort Destination
""")