121
GitHub - goiiot/puppy: A tiny packet capture tool with BPF and no CGO
source link: https://github.com/goiiot/puppy
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
Puppy
A tiny packet capture tool with BPF and no CGO
woof, woof, who's there
Status
This project is at its very early stage, only for concept proof (no CGO BPF), use it at your own risk.
This project has ONLY been TESTED UNDER darwin x64 platform, MIGHT BITE YOU at some time(won't be painful, cause it's just a puppy)
Features
- Network Packet Capture
Usage
Commandline App
- get and install puppy to your
$GOPATH/bin
$ go get github.com/goiiot/puppy
- run (no root required)
# export PATH="$PATH:$GOPATH/bin" $ puppy <iface> # e.g. puppy en0
Go Library
- get puppy bpf library
$ go get github.com/goiiot/puppy/bpf
Open
and use as aio.ReadCloser
(see puppy.go for an esay example)
see godoc for more API information
TODO
- eBPF? (oh, time consuming)
Acknowledgements
Learn how to use BPF as net filter with msantos/bpf.c, many thanks to that great work
LICENSE
Copyright Go-IIoT (https://github.com/goiiot)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK