Skip to content

alexcui03/tiny-sniffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiny Sniffer

Course Project of SJTU NIS3364.

All files in core/parser are generated by gpt4o-mini.

Build from Source

Requirements

  1. git
  2. CMake
  3. Qt6
  4. Npcap

Prepare libpcap

Following the instructions on libpcap README.

For windows, run scripts/build-libpcap.ps1 in project's directory on PowerShell to build libpcap. The compilation output will be in <workspace>/third-party/libpcap/dist. The script will also fetch Npcap installer, which needs to be installed.

Build with CMake

Run cmake and for the project. CMAKE_PREFIX_PATH should be specified with path to libpcap and Qt6. CMAKE_LIBRARY_ARCHITECTURE should be specified for finding libpcap library, depending on your platform.

For example:

mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH="<workspace>/third-party/libpcap/dist;<path-to-qt>/6.7.0/msvc2019_64" -DCMAKE_LIBRARY_ARCHITECTURE="x64" -A x64 ..

Then run cmake with --build to build the project.

cmake --build . -- /m /nologo /p:Configuration=Release

Then run cmake install. All compilation outputs will be in <workspace>/dist.

cmake --install . --prefix "../dist"

About

Course Project of SJTU NIS3364

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published