cap-0.1.4
توضیحات
Cap: lightweight package for use network captures
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | cap-0.1.4 |
| نام | cap |
| نسخه کتابخانه | 0.1.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Netanel Revah |
| ایمیل نویسنده | netanelrevah@outlook.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/cap/ |
| مجوز | MIT |
# Cap: lightweight package for use network captures
[](https://pypi.python.org/pypi/cap/)
[](https://pypi.python.org/pypi/cap/)
[](https://pypi.python.org/pypi/cap/)
[](https://pypi.python.org/pypi/cap/)
The idea is to read and write capture files like it is really a serialized data. The API is ment to be close as possible to json and pickle APIs.
## Installation:
install the package by:
``` bash
pip install cap
```
or from the source:
``` bash
python setup.py install
```
## Usage:
### read cap:
```python
import cap
captured_packets = cap.load(open("C:\\test.cap", "rb"))
```
### filter about somthing
```python
ip_v4_captured_packet = []
for captured_packet in captured_packets:
if captured_packet.data[12:14] == '\x08\x00':
ip_v4_captured_packet.append(p)
```
### dump filtered packets
```python
cap.dump(ip_v4_captured_packet, open('C:\\new_test.cap', "wb"))
```
Have a nice use and please report about problems and issues.
Thank you.
نیازمندی
| مقدار | نام |
|---|---|
| >=0.22.1,<0.23.0 | bidict |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10,<4.0 | Python |
نحوه نصب
نصب پکیج whl cap-0.1.4:
pip install cap-0.1.4.whl
نصب پکیج tar.gz cap-0.1.4:
pip install cap-0.1.4.tar.gz