From cb6a7852bf1015497aaaf40cc41050405f3f3f84 Mon Sep 17 00:00:00 2001 From: clyhtsuriva Date: Sat, 9 May 2020 10:35:49 +0200 Subject: beaucoup de modifs --- www/html/affiche-tas.py | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 www/html/affiche-tas.py (limited to 'www/html/affiche-tas.py') diff --git a/www/html/affiche-tas.py b/www/html/affiche-tas.py new file mode 100644 index 0000000..726bed4 --- /dev/null +++ b/www/html/affiche-tas.py @@ -0,0 +1,38 @@ +#!/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
""") -- cgit v1.2.3