Skip to content

Final project in OS course. Sniffer for traffic capturing. Based on libpcap for capture packages and Qt for viewing and analysing them. Support gui and cli

Notifications You must be signed in to change notification settings

igor185/sniffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sniffer

Final project in OS course. Sniffer for traffic capturing. Based on libpcap for capture packages and Qt for viewing and analysing them. Support gui and cli

Presentation

Team

Prerequisites

  • C++ compiler - needs to support C++17 standard
  • CMake 3.16+
  • libpcap
  • Qt

Dependencies (such as development libraries) can be found in the dependencies folder in the form of the text files with package names for different package managers.

Installing

  1. Clone the project.

    git clone git@github.com:igor185/sniffer.git
  2. Install required packages.

    On Ubuntu:

    [[ -r dependencies/apt.txt ]] && sed 's/#.*//' dependencies/apt.txt | xargs sudo apt-get install -y

    On MacOS:

    [[ -r dependencies/homebrew.txt ]] && sed 's/#.*//' dependencies/homebrew.txt | xargs brew install

    Use Conan on Windows.

  3. Build.

    mkdir build && cd build && cmake .. && make

Usage

sudo ./sniffer --help

Project structure

├── cmake
├── dependencies -- dependencies of project
├── resources -- Qt resources folder
│   └── images
└── src 
    ├── core
    │   ├── core -- main logic for package capturing
    │   └── socket -- definition of packate structure and main function for it
    ├── IO -- IO part of project
    ├── UI 
    │   ├── Details -- Window for full information about package
    │   ├── Filters -- Window for filters set up
    │   ├── HexView -- View for package in hex
    │   ├── InitPage -- Main logic for UI
    │   └── Table -- Table for package preview displaying
    └── utils -- helpers functions

Add new package parsing

  1. Open src/core/sockets.h
  2. Define class representing your packet
  3. Extend base_socket class or more suitable
  4. Add <name_of_protocol>.cpp in src/core/socket folder
  5. Override all needed methods
  6. Add this class in src/core/socket/general.cpp

About

Final project in OS course. Sniffer for traffic capturing. Based on libpcap for capture packages and Qt for viewing and analysing them. Support gui and cli

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published