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

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

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