sniffer

Version, currently master branch1 version
  • master branchlatestApr 2, 2018

github.com/bararchy/sniffer

native socket sniffer without libpcap dependency in Crystal

7 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  sniffer:
    github: bararchy/sniffer
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
0.24.2
License
MIT
Author
Bar Hofesh <bar.hofesh@gmail.com>

Dependencies

This version declares no dependencies.

README

# 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](https://crystal-lang.org/docs/installation/)  

Add this to your application's `shard.yml`:

```yaml
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 

```crystal
require "sniffer"

Sniffer.sniff
```


## Development

* [x] ETH Header parse  
* [x] IP Header parse  
* [x] TCP Header parse  
* [x] 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](https://github.com/bararchy) Bar Hofesh - creator, maintainer