Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

packet-sniffer

A simple packet sniffer written in C that captures TCP and DNS packets and saves them to a capture.pcap file.

Build

To compile the project, run:

make

Usage

This program requires root privileges to open a raw socket.

sudo ./sniffer

To stop capturing, press Ctrl+C. The program will gracefully close the socket and the output file.

Features

  • Captures all packets on the network interface.
  • Filters and displays details for TCP packets and DNS requests (port 53).
  • Saves captured data to capture.pcap which can be opened in Wireshark.

About

[ Read-Only Mirror ]

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages