Skip to content

hb9cwp/sniffer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sniffer

Go version of a raw socket packet sniffer. Uses the gopacket library with inspiration from the PacketBeat project.

Configure

  • Install build tools: apt-get install build-essential
  • Install libpcap: apt-get install libpcap-dev
  • Download dependencies: go get
  • Optional: Modify the config.ini values

Build

  • Build the executable: go build

Help

$ ./sniffer -h
Usage of ./sniffer:
  -config="": Path to ini config for using in go flags. May be relative to the current executable path.
  -enableAf=false: Enable afpacket mode
  -iface="eth0": Interface to capture packets
  -pcapOut="": File path to log all packets

Run

  • Without PCAP logging: ./rawsocket
  • With PCAP logging: `./rawsocket -pcapOut="output.pcap"
  • Use config file: `./rawsocket -config="config.ini"

Clean

go clean

About

Go version of a raw socket packet sniffer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%