Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
P
pcap-anonymize
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneur
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Conditions générales et politique de confidentialité
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
smart-home-network-security
pcap-anonymize
Validations
155e92e6
Valider
155e92e6
rédigé
Il y a 5 mois
par
François De Keersmaeker
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Updated README
parent
0b544b26
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline
#60999
réussi
Il y a 5 mois
Étape : test
Modifications
1
Pipelines
1
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
README.md
+76
-1
76 ajouts, 1 suppression
README.md
avec
76 ajouts
et
1 suppression
README.md
+
76
−
1
Voir le fichier @
155e92e6
# pcap-anonymization
Anonymize PCAP files.
This Python package reads PCAP files,
and produces anonymized versions of the given files.
More precisely, the following fields are anonymized:
-
Ethernet
-
Source MAC address
-
Destination MAC address
-
ARP
-
Source hardware address
-
Destination hardware address
-
DHCP
-
Client hardware address
-
Client Identifier option
-
HTTP
-
All fields are removed, except the method and URI path.
-
Request parameters are removed
-
CoAP
-
All fields are removed, except the type, code, and URI path.
-
TP-Link Smart Home protocol (TCP port 9999)
-
The TCP payload is removed.
## Installation
### Dependencies
-
[
`scapy`
](
https://pypi.org/project/scapy
)
### Retrieve from PyPI
```
bash
pip
install
pcap-anonymize
```
## Usage
### CLI
```
bash
pcap-anonymize
[
-i
input]
[
-o
output]
[
-d
dir
]
```
The program can be used either with a single input PCAP file,
or a directory containing multiple PCAP files.
Options for the former case are the following:
-
`input`
: path to a single input PCAP file
-
`output`
: path to a single output file.
-
If not specified, a new file is created in the same directory as the input file, with the name
`<input>.anon.pcap`
.
In the latter case, only the directory containing the PCAP files is provided.
For each PCAP file, its corresponding, anonymized output file will be created in the same directory,
with the suffix
`anon.pcap`
.
If no option is provided, the program stops directly.
### Library
#### Single input/output file
```
python
from
pcap_anonymize
import
anonymize_pcap
anonymize_pcap
(
input
:
os
.
PathLike
,
output
:
os
.
PathLike
=
None
)
```
#### Directory
```
python
from
pcap_anonymize
import
anonymize_pcaps_in_dir
anonymize_pcaps_in_dir
(
dir
:
os
.
PathLike
)
```
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter