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)
Metadata
Release files for SHRUG-anon 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| SHRUG_anon-1.0.1.tar.gz | 3.0 kB | Without provenance | Details for SHRUG_anon-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| SHRUG_anon-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for SHRUG_anon-1.0.1-py3-none-any.whl |
Total release size: 6.1 kB
Release files / SHRUG_anon-1.0.1.tar.gz
| Download URL | SHRUG_anon-1.0.1.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae4eae22d78a55c9da04e2c782d02be459cc48e70ede3cca6bb1f7352233952e
|
|
BLAKE2b-256 checksum How to use checksums |
5781e15259f56cbf33c62f4f0b097a67615ee564996976ef5fb4ddae5bfce532
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / SHRUG_anon-1.0.1-py3-none-any.whl
| Download URL | SHRUG_anon-1.0.1-py3-none-any.whl |
|---|---|
| Size | 3.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
64ff889140a0f7e67d4a091a69f20b6ba52d66e1b762f293ca26fc9570f36ba9
|
|
BLAKE2b-256 checksum How to use checksums |
0dc98d2bd2946a001293ed1290ede84d9355bb41040d4accb1280614159fc3f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for SHRUG-anon 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.