Skip to content

elrik75/sniffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Go Sniffer

This code aims to sniff the network (or a PCAP file) and generates stats in some CSV files. The idea is to use a Go routine for each parser and then get a very simple code.

Install

export GOPATH=$PWD
export GOMAXPROCS=8
go build -o sniffer main.go

Sniff the network:

sudo sniffer -i eth0

Or read a pcap file:

sniffer -r file.pcap

Profiling

  • install graphviz

  • run the sniffer with the -profile option

    ./sniffer -r file.pcap -profile

  • a file profiling.pprof was build

  • generate a pdf with:

    go tool pprof --pdf sniffer profiling.pprof > profile.pdf

About

sniff the network or a pcap with libpcap and store stats

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published