Skip to main content

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:

  1. Randomizer algorithm (randomizer)
  2. Prefix Preserving algorithm (prefAnon) [Using CryptoPAn]
  3. BlackMarker algorithm (blackMarker)
  4. Permutation algorithm (permutation)
  5. Truncation algorithm (truncation)
  6. 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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

SHRUG_anon-1.0.1-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file SHRUG_anon-1.0.1.tar.gz.

File metadata

  • Download URL: SHRUG_anon-1.0.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for SHRUG_anon-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ae4eae22d78a55c9da04e2c782d02be459cc48e70ede3cca6bb1f7352233952e
MD5 bea00dde7ab96cbbdfb2ccef3c5e03cc
BLAKE2b-256 5781e15259f56cbf33c62f4f0b097a67615ee564996976ef5fb4ddae5bfce532

See more details on using hashes here.

File details

Details for the file SHRUG_anon-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: SHRUG_anon-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for SHRUG_anon-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 64ff889140a0f7e67d4a091a69f20b6ba52d66e1b762f293ca26fc9570f36ba9
MD5 ea49b17765386b0e7360c10f13890bc4
BLAKE2b-256 0dc98d2bd2946a001293ed1290ede84d9355bb41040d4accb1280614159fc3f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page