-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
59 lines (50 loc) · 1.8 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
from setuptools import setup, find_packages
setup(
long_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](https://github.com/Yawning/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)
``` """,
long_description_content_type='text/markdown',
name='SHRUG_anon',
version='1.0.1',
license='MIT',
author=["Gopal Nambiar",
"Shreyas Madhav",
"Ruthuvikas Ravikumar",
],
author_email='[email protected]',
packages=find_packages('src'),
package_dir={'': 'src'},
url='https://github.com/gopuman/SHRUG',
keywords='Anonymization project',
install_requires=[
'scapy',
'yacryptopan',
'numpy',
],
)