bararchy / sniffer

native socket sniffer without libpcap dependency in Crystal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sniffer

Sniffer is a project to try and decipher network packets from the ETH level and up.
One of the goals of this project is not to relay on libpcap

Installation

  1. Install Crystal

Add this to your application's shard.yml:

dependencies:
  sniffer:
    github: bararchy/sniffer

Usage

You have to run the code as root to allow raw sockets.

In the root dir run sudo crystal spec

or

require "sniffer"

Sniffer.sniff

Development

  • ETH Header parse
  • IP Header parse
  • TCP Header parse
  • UDP Header parse

Contributing

  1. Fork it ( https://github.com/bararchy/sniffer/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • bararchy Bar Hofesh - creator, maintainer

About

native socket sniffer without libpcap dependency in Crystal

License:MIT License


Languages

Language:Crystal 100.0%