Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dsamirov/tarantool-iproto-sniffer
https://github.com/dsamirov/tarantool-iproto-sniffer
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dsamirov/tarantool-iproto-sniffer
- Owner: dsamirov
- Created: 2020-02-12T08:56:58.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-28T08:48:03.000Z (10 months ago)
- Last Synced: 2024-08-03T22:06:53.266Z (4 months ago)
- Language: Python
- Size: 7.81 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-tarantool - iproto-sniffer - (Packages / Administration)
README
# Info
Supported tarantool protocol commands:
* INSERT
* REPLACE
* CALL
* EVAL
* UPSERT
* SELECT
* CALL_16
* AUTH
* PING
* JOIN
* SUBSCRIBE# Install
```
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
```# Usage
```
$ sudo ./venv/bin/python main.py -h
usage: main.py [-h] [-i IFACE] [--from-pcap FROM_PCAP] [--filter FILTER] [--output OUTPUT]options:
-h, --help show this help message and exit
-i IFACE, --iface IFACE
interface
--from-pcap FROM_PCAP
from pcap file
--filter FILTER filter to pcap file (ex. port 3301)
--output OUTPUT output filename$ sudo ./venv/bin/python main.py --iface lo --output result.file
```# Examples
## Read from pcap
Filter is the same as "tcpdump filter", so you may:
`src port 3301` or `port 3301 and dst host 127.0.0.1` and so on.
```
$ python3 main.py --from-pcap traffic.pcap --filter "port 3301"
```## Sniff in realtime
```
$ python3 main.py --iface eth0 --filter "port 3301"
```## Execute dump file to another tarantool instance
Required [jq](https://stedolan.github.io/jq/)
```
$ jq -M .payload.hex < result.file | sed 's/"//g' | xxd -r -p | nc localhost 3301
```