Skip to content

Instantly share code, notes, and snippets.

View AnubhavPabby's full-sized avatar

Anubhav Pabby AnubhavPabby

View GitHub Profile
@AnubhavPabby
AnubhavPabby / lsniffer.c
Created April 7, 2018 14:02 — forked from fffaraz/lsniffer.c
Packet Sniffer Code in C using Linux Sockets | http://www.binarytides.com/packet-sniffer-code-c-linux/
/*
Packet sniffer using libpcap library
*/
#include<pcap.h>
#include<stdio.h>
#include<stdlib.h> // for exit()
#include<string.h> //for memset
#include<sys/socket.h>
#include<arpa/inet.h> // for inet_ntoa()