https://github.com/bararchy/sniffer
native socket sniffer without libpcap dependency in Crystal
https://github.com/bararchy/sniffer
Last synced: about 1 year ago
JSON representation
native socket sniffer without libpcap dependency in Crystal
- Host: GitHub
- URL: https://github.com/bararchy/sniffer
- Owner: bararchy
- License: mit
- Created: 2018-04-02T07:29:23.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-02T12:09:46.000Z (over 8 years ago)
- Last Synced: 2025-04-01T04:32:41.178Z (over 1 year ago)
- Language: Crystal
- Size: 279 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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