https://github.com/yudaishimanaka/rawdump
Go raw socket packet capture
https://github.com/yudaishimanaka/rawdump
golang packet-capture raw-socket
Last synced: about 1 month ago
JSON representation
Go raw socket packet capture
- Host: GitHub
- URL: https://github.com/yudaishimanaka/rawdump
- Owner: yudaishimanaka
- License: mit
- Created: 2018-03-24T00:51:09.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-22T13:10:04.000Z (over 6 years ago)
- Last Synced: 2025-04-15T19:54:01.236Z (about 1 month ago)
- Topics: golang, packet-capture, raw-socket
- Language: Go
- Homepage:
- Size: 5.37 MB
- Stars: 12
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rawdump
Simple raw socket packet capture.## Demo
## Requirement
- Golang 1.10 ~
- External package
- golang.org/x/sys/unix
- github.com/google/gopacket/pcap## Install
`make`## Usage
First, Let's move the binary(`rawdump`) to `/usr/bin/`### Capture
e.g.) `sudo rawdump -d eth0 -f "tcp and port 80"`### Options
*`-d`* : Selecting a network interface. Interface name after option.
*`-f`* : Filtering based on `tcpdump`. Filter string enclosed in double quotes after option.
*`-w`* : Write the results of the capture to the pcap file. File name after option.
*`-r`* : Read pcap file. File name after option.
*`-b`* : Bridge capture mode. e.g.) `sudo rawdump -b "eht0 to eth1"`## License
The MIT License (MIT) -see `LICENSE` for more details.