From ff54c8915dce54d5c4494c4b85270f45775bd4ee Mon Sep 17 00:00:00 2001 From: clyhtsuriva Date: Thu, 7 May 2020 10:17:10 +0200 Subject: ajout page syntaxe et filtrage + filtrage effectif --- analyse/script.sh | 6 ++---- www/html/affiche-tab.py | 4 +--- www/html/filtrage.py | 19 +++++++++++++++++++ www/html/fonctions.py | 6 ++++-- www/html/index.py | 2 +- www/html/syntaxe.py | 25 +++++++++++++++++++++++++ 6 files changed, 52 insertions(+), 10 deletions(-) create mode 100755 www/html/filtrage.py create mode 100755 www/html/syntaxe.py diff --git a/analyse/script.sh b/analyse/script.sh index 9ec7123..056e47b 100755 --- a/analyse/script.sh +++ b/analyse/script.sh @@ -4,10 +4,8 @@ #TO-DO: #prend en compte l'interface internet par defaut sur la machine #recupere l'adresse IP lie a cette interface -#installe tcpdump avant toute chose #corrige le deplacement du cut dans certaines trames (comme ARP) #Affiche quelque chose d'autre que "IP" en protocole (probleme pour la plupart des paquets -#enleve ce qu'il y a apres la virgule pour les secondes #ajoute la date #insert dans la bdd les differentes infos @@ -29,7 +27,7 @@ while : do - sudo tcpdump -i wlp2s0 -c1 -nn tcp -w capturetcp.pcap + sudo tcpdump -i $1 -c1 -nn tcp -w capturetcp.pcap sudo tcpdump -nn -r capturetcp.pcap > grostastcp echo -e "Voici un paquet TCP\n" cat grostastcp | cut -d" " -f1 >> /tmp/heuretcp.txt @@ -45,7 +43,7 @@ do # Attention ici c'est UDP - sudo tcpdump -i wlp2s0 -c1 -nn udp -w captureudp.pcap + sudo tcpdump -i $1 -c1 -nn udp -w captureudp.pcap sudo tcpdump -nn -r captureudp.pcap > grostasudp echo -e "Voici un paquet UDP\n" cat grostasudp | cut -d" " -f1 >> /tmp/heureudp.txt diff --git a/www/html/affiche-tab.py b/www/html/affiche-tab.py index 2f5a516..5481d84 100644 --- a/www/html/affiche-tab.py +++ b/www/html/affiche-tab.py @@ -34,6 +34,4 @@ def index(req): """ + content + """ - -""")) - +""") diff --git a/www/html/filtrage.py b/www/html/filtrage.py new file mode 100755 index 0000000..1c294b2 --- /dev/null +++ b/www/html/filtrage.py @@ -0,0 +1,19 @@ +#!/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() + +#write the html page + req.write(baseHTML("ATS-Project",""" +

Filtrage

+Filtre + +
+
+ +""")) diff --git a/www/html/fonctions.py b/www/html/fonctions.py index 6bfdf18..b9efce1 100755 --- a/www/html/fonctions.py +++ b/www/html/fonctions.py @@ -12,8 +12,10 @@ def baseHTML(title,body): """+ body +""" diff --git a/www/html/index.py b/www/html/index.py index 7e45dca..958c5be 100755 --- a/www/html/index.py +++ b/www/html/index.py @@ -32,7 +32,7 @@ def index(req): #write the html page req.write(baseHTML("ATS-Project","""

ATS-Project

-Filtrage +Filtre
diff --git a/www/html/syntaxe.py b/www/html/syntaxe.py new file mode 100755 index 0000000..cdaf5f7 --- /dev/null +++ b/www/html/syntaxe.py @@ -0,0 +1,25 @@ +#!/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() + +#write the html page + req.write(baseHTML("ATS-Project",""" +

Syntaxe

+

La """+lien('syntaxe.py','syntaxe')+""" pour utiliser les filtres disponibles sur l'"""+lien('index.py','index')+""" et """+lien('filtrage.py','filtrage')+""" est la suivante :

+

<colonne>='<valeur>'


+
+ + + + + + + +
colonnevaleurexemple
heurehh:mm:ssheure='10:41:30'
protocoletexteprotocole='ICMP'
ip_sourceW.X.Y.Zip_source='10.110.178.156'
ip_destinationW.X.Y.Zip_destination='1.1.1.1'
port_sourceXport_source='10000'
port_destinationXport_destination='56'
+""")) -- cgit v1.2.3 2d&follow=1'>Fixing conflictsmanthole2-0/+139 2021-06-27Latest maven, jacoco and javadoc filesClyhtsuriva47-313/+822 2021-06-27Catch exception related to search functionalitysaid belhadj4-3/+11 2021-06-27Delete TEST-musichub.business.CategoryTest.xmlSaid Belhadj1-58/+0 2021-06-27Add unit test for Category and Languagesaid belhadj4-0/+164 2021-06-27Update search functionalitysaid belhadj2-0/+8 2021-06-27Added an extension check for songs and covered it with a test.Clyhtsuriva65-77/+92 2021-06-27Fix : Javadoc missingClyhtsuriva80-0/+8465 2021-06-27PlayList class covered at 84%.Clyhtsuriva14-78/+117 2021-06-27Song class fully covered.Clyhtsuriva13-49/+96 2021-06-27Starting Song testsClyhtsuriva17-59/+119 2021-06-27Changed the log type for the JUnit test of LogHandlerClyhtsuriva5-26/+4 2021-06-27XMLHandler tests covered at 91%Clyhtsuriva93-7962/+82