4thel00z / libsniff

c library to open raw sockets and sniff on noobs.

Home Page:https://github.com/clibs/clib/wiki/Packages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

libsniff

libsniff logo

Motivation

Opening raw sockets in c is mad complicated yo. This library encapsulates the heavy lifting for non-weird drivers and returns you a socket that you can you can consume for a given interface name.

Installation

Since this is a clib library you can easily install it via:

clib install 4thel00z/libsniff

Usage

#include "../deps/libsniff/libsniff.h"
#include <stdio.h>

int main() {
  int sock = libsniff_open_raw("wlan0mon");

  if (sock == -1) {
    fprintf(stderr, "something went wrong with libsniff_open_raw");
    return sock;
  }
  // Use sock with recv and a buffer...

  return 0;
}

License

This project is licensed under the GPL-3 license.

About

c library to open raw sockets and sniff on noobs.

https://github.com/clibs/clib/wiki/Packages

License:GNU General Public License v3.0


Languages

Language:C 100.0%