Aggregates wireshark pdml to flows
Project description
# pdml2flow [](https://badge.fury.io/py/pdml2flow)
_Aggregates wireshark pdml to flows_
| Branch | Build | Coverage |
| ------- | ------ | -------- |
| master | [](https://travis-ci.org/Enteee/pdml2flow) | [](https://coveralls.io/github/Enteee/pdml2flow?branch=master) |
| develop | [](https://travis-ci.org/Enteee/pdml2flow) | [](https://coveralls.io/github/Enteee/pdml2flow?branch=develop) |
## Prerequisites
* [python]:
- 3.4
- 3.5
- 3.5-dev # 3.5 development branch
- nightly # currently points to 3.6-dev
* [pip](https://pypi.python.org/pypi/pip)
## Installation
$ sudo pip install pdml2flow
## Usage
```shell
$ pdml2flow -h
usage: pdml2flow [-h] [-f FLOW_DEF_STR] [-t FLOW_BUFFER_TIME] [-l DATA_MAXLEN]
[-s] [-x] [-c] [-a] [-m] [-d]
Aggregates wireshark pdml to flows
optional arguments:
-h, --help show this help message and exit
-f FLOW_DEF_STR Fields which define the flow, nesting with: '.'
[default: ['vlan.id', 'ip.src', 'ip.dst', 'ipv6.src',
'ipv6.dst', 'udp.stream', 'tcp.stream']]
-t FLOW_BUFFER_TIME Lenght (in seconds) to buffer a flow before writing the
packets [default: 180]
-l DATA_MAXLEN Maximum lenght of data in tshark pdml-field [default:
200]
-s Extract show names, every data leave will now look like
{ raw : [] , show: [] } [default: False]
-x Switch to xml output [default: False]
-c Removes duplicate data when merging objects, will not
preserve order of leaves [default: False]
-a Instaead of merging the frames will append them to an
array [default: False]
-m Appends flow metadata [default: False]
-d Debug mode [default: False]
```
## Example
Sniff from interface:
```shell
$ tshark -i interface -Tpdml | pdml2flow
```
Write xml output
```shell
$ tshark -i interface -Tpdml | pdml2flow -x
```
Read a .pcap file
```shell
$ tshark -r pcap_file -Tpdml | pdml2flow
```
Aggregate based on ethernet source and ethernet destination address
```shell
$ tshark -i interface -Tpdml | pdml2flow -f eth.src -f eth.dst
```
Pretty print flows using [jq]
```shell
$ tshark -i interface -Tpdml | pdml2flow | jq
```
Post-process flows using [FluentFlow]
```shell
$ tshark -i interface -Tpdml | pdml2flow | fluentflow rules.js
```
## Utils
The following utils are part of this project
### pdml2json
_Converts pdml to json_
### Usage
```shell
$ pdml2json -h
usage: pdml2json [-h] [-s] [-d]
Converts wireshark pdml to json
optional arguments:
-h, --help show this help message and exit
-s Extract show names, every data leave will now look like { raw :
[] , show: [] } [default: False]
-d Debug mode [default: False]
```
### pdml2xml
_Converts pdml to xml_
### Usage
```shell
$ pdml2xml -h
usage: pdml2xml [-h] [-s] [-d]
Converts wireshark pdml to xml
optional arguments:
-h, --help show this help message and exit
-s Extract show names, every data leave will now look like { raw :
[] , show: [] } [default: False]
-d Debug mode [default: False]
```
[python]: https://www.python.org/
[wireshark]: https://www.wireshark.org/
[dict2xml]: https://github.com/delfick/python-dict2xml
[jq]: https://stedolan.github.io/jq/
[FluentFlow]: https://github.com/t-moe/FluentFlow
_Aggregates wireshark pdml to flows_
| Branch | Build | Coverage |
| ------- | ------ | -------- |
| master | [](https://travis-ci.org/Enteee/pdml2flow) | [](https://coveralls.io/github/Enteee/pdml2flow?branch=master) |
| develop | [](https://travis-ci.org/Enteee/pdml2flow) | [](https://coveralls.io/github/Enteee/pdml2flow?branch=develop) |
## Prerequisites
* [python]:
- 3.4
- 3.5
- 3.5-dev # 3.5 development branch
- nightly # currently points to 3.6-dev
* [pip](https://pypi.python.org/pypi/pip)
## Installation
$ sudo pip install pdml2flow
## Usage
```shell
$ pdml2flow -h
usage: pdml2flow [-h] [-f FLOW_DEF_STR] [-t FLOW_BUFFER_TIME] [-l DATA_MAXLEN]
[-s] [-x] [-c] [-a] [-m] [-d]
Aggregates wireshark pdml to flows
optional arguments:
-h, --help show this help message and exit
-f FLOW_DEF_STR Fields which define the flow, nesting with: '.'
[default: ['vlan.id', 'ip.src', 'ip.dst', 'ipv6.src',
'ipv6.dst', 'udp.stream', 'tcp.stream']]
-t FLOW_BUFFER_TIME Lenght (in seconds) to buffer a flow before writing the
packets [default: 180]
-l DATA_MAXLEN Maximum lenght of data in tshark pdml-field [default:
200]
-s Extract show names, every data leave will now look like
{ raw : [] , show: [] } [default: False]
-x Switch to xml output [default: False]
-c Removes duplicate data when merging objects, will not
preserve order of leaves [default: False]
-a Instaead of merging the frames will append them to an
array [default: False]
-m Appends flow metadata [default: False]
-d Debug mode [default: False]
```
## Example
Sniff from interface:
```shell
$ tshark -i interface -Tpdml | pdml2flow
```
Write xml output
```shell
$ tshark -i interface -Tpdml | pdml2flow -x
```
Read a .pcap file
```shell
$ tshark -r pcap_file -Tpdml | pdml2flow
```
Aggregate based on ethernet source and ethernet destination address
```shell
$ tshark -i interface -Tpdml | pdml2flow -f eth.src -f eth.dst
```
Pretty print flows using [jq]
```shell
$ tshark -i interface -Tpdml | pdml2flow | jq
```
Post-process flows using [FluentFlow]
```shell
$ tshark -i interface -Tpdml | pdml2flow | fluentflow rules.js
```
## Utils
The following utils are part of this project
### pdml2json
_Converts pdml to json_
### Usage
```shell
$ pdml2json -h
usage: pdml2json [-h] [-s] [-d]
Converts wireshark pdml to json
optional arguments:
-h, --help show this help message and exit
-s Extract show names, every data leave will now look like { raw :
[] , show: [] } [default: False]
-d Debug mode [default: False]
```
### pdml2xml
_Converts pdml to xml_
### Usage
```shell
$ pdml2xml -h
usage: pdml2xml [-h] [-s] [-d]
Converts wireshark pdml to xml
optional arguments:
-h, --help show this help message and exit
-s Extract show names, every data leave will now look like { raw :
[] , show: [] } [default: False]
-d Debug mode [default: False]
```
[python]: https://www.python.org/
[wireshark]: https://www.wireshark.org/
[dict2xml]: https://github.com/delfick/python-dict2xml
[jq]: https://stedolan.github.io/jq/
[FluentFlow]: https://github.com/t-moe/FluentFlow
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pdml2flow-1.2.tar.gz
(15.2 kB
view details)
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pdml2flow-1.2-py3.6.egg
(31.2 kB
view details)
pdml2flow-1.2-py3.5.egg
(31.2 kB
view details)
pdml2flow-1.2-py3.4.egg
(31.3 kB
view details)
File details
Details for the file pdml2flow-1.2.tar.gz.
File metadata
- Download URL: pdml2flow-1.2.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4005cd58e36b83cdc0dc3bb78e0a14d654f71d8046f1e38e0f281288ac27b290
|
|
| MD5 |
d168e700a64acb60984d60fdc2019c16
|
|
| BLAKE2b-256 |
d9146ba219aa514a07d6934edfb1accf10b74740542245ab9daeb23981003a7d
|
File details
Details for the file pdml2flow-1.2-py3.6.egg.
File metadata
- Download URL: pdml2flow-1.2-py3.6.egg
- Upload date:
- Size: 31.2 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f25eed63230de8499686f58bc60c2655de3f1e7f972d5299c90ef79ee74e4e6
|
|
| MD5 |
9c476c9a86341001d4ba696ebc67bfb7
|
|
| BLAKE2b-256 |
3b73baf1d6cb8560ecb3c1734dbfe8e80521ad09aeef127709dc8c8b08107b61
|
File details
Details for the file pdml2flow-1.2-py3.5.egg.
File metadata
- Download URL: pdml2flow-1.2-py3.5.egg
- Upload date:
- Size: 31.2 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3618feb8a389cf27337cabb4082ff730506fbecc21584138e0e1eaa9ff781d38
|
|
| MD5 |
53310a7a65b67fc4addc6e1baf9729d7
|
|
| BLAKE2b-256 |
43c471e241a0cb3072718308576d7f1d4399ede702809c583cfcc74689b10629
|
File details
Details for the file pdml2flow-1.2-py3.4.egg.
File metadata
- Download URL: pdml2flow-1.2-py3.4.egg
- Upload date:
- Size: 31.3 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41e1c7b5e491c54e0a0f471d1932150c9125ead8a989ebcb46254d0b1848bc2f
|
|
| MD5 |
dd65e9d91a2ce19b9cbf30e1d738d5c5
|
|
| BLAKE2b-256 |
7d87c99d4f35372478ba1a097710ee7128c7afaed267ab944ad49271558b5e81
|