No project description provided
Project description
SHRUG is a simple Python library that lets users anonymize source and destination IP addresses in packet traces. As of the current release, SHRUG supports the following anonymization algorithms:
- Randomizer algorithm (randomizer)
- Prefix Preserving algorithm (prefAnon) [Using CryptoPAn]
- BlackMarker algorithm (blackMarker)
- Permutation algorithm (permutation)
- Truncation algorithm (truncation)
- Reverse Truncation algorithm (revTruncation)
Usage
- Install the package using pip
pip install SHRUG-anon
- Import the module and the anonymization methods
>>> from SHRUG_anon import anonalgos
- The read_from method can be used to read a .pcap or .tcpdump file
>>> input_pks = anonalgos.read_from("/path/to/pcap/tcpdump/file")
- Use one of the six anonymization algorithms on the packet capture stored in the previous step, and store the anonymized packets.
>>> anonalgos.randomizer(input_pks)
>>> anonalgos.write_to("/path/to/anonymized/packets/.pcap/.tcpdump")
- NOTE: The truncation and reverse truncation algorithms require a second parameter, i.e., the number of bits to be truncated.
>>> anonalgos.truncation(input_pks, 12)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
SHRUG_anon-1.0.1.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for SHRUG_anon-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64ff889140a0f7e67d4a091a69f20b6ba52d66e1b762f293ca26fc9570f36ba9 |
|
MD5 | ea49b17765386b0e7360c10f13890bc4 |
|
BLAKE2b-256 | 0dc98d2bd2946a001293ed1290ede84d9355bb41040d4accb1280614159fc3f5 |