semvec/pypi-packages huggingface dataset:
slicecap 0.3.0
Slice a pcap file into pieces and process in parallel
License: BSD License
Requires Python: >=3.13

# Slice a large pcap file and process in parallel

## Install

    python setup.py install

## Usage

The below is an example to slice a pcap file into 10 files.

    slicecap -r source.pcap -n 10 -- "cat - > dest-{SLICE_ID}.pcap"

The `-r` or `--infile` option specifies input pcap file to slice.
Stdin is not acceptable because `slicecap` will change file handle
pointer using the `seek()` method.

The `-n` or `--number` option specifies the total number of sliced
pcap files.  This default value is 2.

The `-g` or `--maxgap` option specifies the maximum time difference
(in seconds) used to compare packet timestamps to find the pcap pkthdr
boundary.  The default value is 3600.

The `-p` or `--parallel` option specifies the maximum number of
parallel subprocesses.  The default value is automatically determined
based on the number of cores of the host node.  It doesn't make sense
to specify a larger value than the number of cores.

After the `--` option, you can specify a subprocess to process the
sliced pcap data.  In the above example, the sliced data will just
redirected into files.  In the subprocess definition, you can use the
following keywords that are replaced dynamically when executed.  Since
the replacement will be done by the Python text formatting function,
you can specify formatting rules using the standard Python text
formatter syntax.

- `OFFSET`: The file offset value in bytes.
- `SIZE`: The size of the sliced pcap data.
- `SLICE_ID`: The ID number (begins from 0) of the sliced file.


## Bug Reports
Please submit bug reports or patches through the GitHub interface.

## Author
Keiichi SHIMA
/ IIJ Innovation Institute Inc.
/ WIDE project
yacryptopan 1.0.2
Yet another Crypto-PAn implementation for Python
License: BSD License

# Yet another Crypto-PAn implementation for Python

## Overview

This package provides a function to anonymize IP addresses keeping
their prefix consistency.  This program is based on the paper
"Prefix-Preserving IP Address Anonymization: Measurement-based
Security Evaluation and a New Cryptography-based Scheme" written by
Jun Xu, Jinliang Fan, Mostafa H. Ammar, and Sue B. Moon.  The detailed
explanation can be found in [Xu2002].

This package supports both IPv4 and IPv6 anonymization.

## Usage

    >>> from yacryptopan import CryptoPAn
    >>> cp = CryptoPAn(b'32-char-str-for-AES-key-and-pad.')
    >>> cp.anonymize('192.0.2.1')
    '192.0.125.244'
    >>> cp.anonymize_bin(0xc0000201, version=4)
    3221257716L
    >>> cp.anonymize('2001:db8::1')
    '27fe:8bc7:fee:1e:1e1f:f0fe:f0e1:83fd'
    >>> cp.anonymize_bin(0x20010db8000000000000000000000001, version=6)
    53161570263948813229648829710638089213L

## Code

The source code is available at https://github.com/keiichishima/yacryptopan

This module works with Python3.

## Bug Reports

Please submit bug reports or patches through the GitHub interface.

## References

[Xu2002] Jun Xu, Jinliang Fan, Mostafa H. Ammar, and Sue B. Moon,
"Prefix-Preserving IP Address Anonymization: Measurement-based
Security Evaluation and a New Cryptography-based Scheme", in
Proceedings of the IEEE International Conference on Network Protocols,
Paris, 2002.

## Contributors

- Cornelius Diekmann, https://github.com/diekmann
- Matteo Pergolesi, https://github.com/TheWall89
- AaronK, https://github.com/aaronkaplan

## Author

Keiichi SHIMA
/ IIJ Innovation Institute Inc.
/ WIDE project