Skip to main content

This tool extracts the Compressed Beamforming Report data from a PCAP file and saves it to a JSON file.

Project description

Compressed Beamforming Extractor

Overview

This tool extracts the Compressed Beamforming Report data from a PCAP file and saves it to a JSON or CSV file.

Dependencies

python >= 3.9
wireshark >= 4.4.0

Usage

cbrext test/pcaps/beamforming.pcap -W test_out.json

Options

-h,  --help                     Show this help message and exit

-d,  --dir                      Extract all PCAP files in a directory
-W,  --write    <file or dir>   Write the extracted data to a file

-sa, --src-addr <wlan.sa>       Filter by source address
-su, --single-user              Extract SU
-mu, --multi-user               Extract MU

-j,  --json                     Write the extracted data to a JSON file (default)
-c,  --csv                      Write the extracted data to a CSV file  # in progress
-p,  --pcap                     Write the extracted data to a PCAP file # in progress
-b,  --binary                   Decode the CBR hex to binary

-i,  --info                     Print the CBR info
-l,  --length                   Setting the length of the CBR data

-v,  --verbose                  Print verbose output

Examples

Directory Option: -d

cbrext -d tests/pcaps/ -W test_out.json

shell out:

$ cbrext -d tests/pcaps/ -W test_out.json
Processing tests/pcaps/ and generating output...
[ 1/2 ] filtered_4F_0.pcap -> CBR Length: 7900612
[ 2/2 ] filtered_4F_m0.pcap -> CBR Length: 12088706
PCAP Count: 2
Total CBR Length: 19989318

json out:

[
    [
        "75:2e:a9:68 ...",
        "75:2f:69:68 ...",
        ...
    ],
    [
        "69:70:77:f5 ...",
        "69:70:77:f5 ...",
        ...
    ]
]

Binary Option: -b

cbrext tests/pcaps/filtered_4F_0.pcap -W test_out.json -i -l 2639

shell out:

$ cbrext tests/pcaps/filtered_4F_0.pcap -W test_out.json -i -l 2639
Processing tests/pcaps/filtered_4F_0.pcap and generating output...
Total CBR Length: 7900612
{'2639_2_3_2': {'nc': '2', 'nr': '3', 'min_antenna': '2', 'count': 126}, '2651_2_3_2': {'nc': '2', 'nr': '3', 'min_antenna': '2', 'count': 2153}}

Length Option: -l

cbrext tests/pcaps/filtered_4F_0.pcap -W test_out.json -i -l 2639

json out:

Note: It is recommended to determine and set an appropriate value to limit the length information of CBRs after analyzing it with the -i option. Currently, Wireshark has a bug where the CBR length is recognized as 4 bytes longer in portion of packets. Therefore, you can use the -l option to extract only the desired length and the -i option to check the number of antennas.

[
    "75:2e:a9:68 ...",
    "75:2f:69:68 ...",
    ...
]

Development

Installation

python -m pip install .

Updating

python -m pip install --upgrade .

Testing

python -m unittest discover -s tests

Uninstalling

python -m pip uninstall cbrext

Citation

Meneghello, Francesca, Rossi, Michele, and Restuccia, Francesco. "DeepCSI: Rethinking Wi-Fi Radio Fingerprinting Through MU-MIMO CSI Feedback Deep Learning." In IEEE International Conference on Distributed Computing Systems, 2022.

See: https://github.com/francescamen/DeepCSI for more details.

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

cbrext-0.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

cbrext-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file cbrext-0.1.0.tar.gz.

File metadata

  • Download URL: cbrext-0.1.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.0

File hashes

Hashes for cbrext-0.1.0.tar.gz
Algorithm Hash digest
SHA256 48698cdf086dfba4a6069cda929236f31e48357f624cd1110ccc606cf603130a
MD5 af537f9c3df18daa09d8a3972b194a47
BLAKE2b-256 4beb1cb89f84219f69312cf6633933cdfdb135af2fc0472740a2b275e61ffd53

See more details on using hashes here.

File details

Details for the file cbrext-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cbrext-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.0

File hashes

Hashes for cbrext-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de0c5de81fa88ad4498fcc7e13296b34c7d41f7d30f313cd58705d4f385b3e3b
MD5 e83a024b4cf182ca937ff1e7de031ed6
BLAKE2b-256 ba9b01fc50ad0dfcf108c02b9c3cc0bf469b810c1d7567972100b53f6d5ff465

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