Code Monkey home page Code Monkey logo

sniffnet's Introduction

Application to comfortably monitor your Internet traffic
Cross-platform, Intuitive, Reliable

Translated in:
🇨🇳 🇩🇪 🇫🇷 🇷🇺 🇵🇹 🇪🇦 🇮🇹 🇵🇱 + 11 more languages

Support Sniffnet's development 💖

Sniffnet is completely free, open-source software which needs lots of effort and time to develop and maintain.

If you appreciate Sniffnet, consider sponsoring: your support will allow me to dedicate more time to this project, constantly expanding it including new features and functionalities.

A special mention goes to these awesome organizations and folks who are sponsoring Sniffnet:

GitHub   IPinfo   Cthulu201   Tiansheng Li   ZEROF   Jan Walter

Download

Windows macOS Linux (.deb) Linux (.rpm)
        64‑bit | 32‑bit         Intel | Apple silicon amd64 | arm64 | i386 | armhf         x86_64 | aarch64        

Links in the table above will download the latest version of Sniffnet directly from GitHub releases.

Note

Remember to also install the required dependencies for your operating system.

Alternative installation methods are reported in the following:

from Crates.io

Follow this method only if you have Rust installed on your machine.
In this case, the application binary can be built and installed with:

cargo install sniffnet
from Homebrew

You can install Sniffnet Homebrew package with:

brew install sniffnet
from Nixpkgs

You can install Sniffnet Nix package adding the following Nix code to your NixOS Configuration, usually located in /etc/nixos/configuration.nix:

environment.systemPackages = [
  pkgs.sniffnet
];

Alternatively, you can install it in your home using Home Manager with:

home.packages = [
  pkgs.sniffnet
];

Alternatively, you can try it in a shell with:

nix-shell -p sniffnet
on Arch Linux

You can install Sniffnet community package via pacman:

pacman -S sniffnet
on FreeBSD

You can install Sniffnet port with:

pkg install sniffnet
on NetBSD

You can install Sniffnet from the official repositories via pkgin:

pkgin install sniffnet
on Tiny Core Linux

You can install Sniffnet from the official repository with:

tce-load -wi sniffnet

Features

  • 💻 choose a network adapter of your PC to inspect
  • 🏷️ select a set of filters to apply to the observed traffic
  • 📖 view overall statistics about your Internet traffic
  • 📈 view real-time charts about traffic intensity
  • 📌 keep an eye on your network even when the application is minimized
  • 📁 export comprehensive capture reports as PCAP files
  • 🔎 identify 6000+ upper layer services, protocols, trojans, and worms
  • 🌐 find out domain name and ASN of the hosts you are exchanging traffic with
  • 🏠 identify connections in your local network
  • 🌍 get information about the country of remote hosts (IP geolocation)
  • ⭐ save your favorite network hosts
  • 🕵️‍♂️ search and inspect each of your network connections in real time
  • 🔉 set custom notifications to inform you when defined network events occur
  • 🎨 choose the style that fits you the most, including custom themes support
  • ...and more!

User manual

Do you want to learn more?
Check out the Sniffnet Wiki, a comprehensive manual to help you thoroughly master the application from a basic setup to the most advanced functionalities.
The Wiki includes step-by-step guides, tips, examples of usage, and answers to frequent questions.

Troubleshooting

See details

Missing dependencies

Most of the errors that may arise are likely due to your system missing dependencies required to correctly analyze a network adapter.
Check the required dependencies page for instructions on how to proceed depending on your operating system.

Rendering problems

In some circumstances, especially if you are running on an old architecture or your graphical drivers are not updated, the wgpu default renderer used by iced may manifest bugs (the interface glitches, color gradients are unsupported, or some icons are completely black).
In these cases you can set an environment variable to switch to the tiny-skia renderer, a CPU-only software renderer that should work properly on every environment:

ICED_BACKEND=tiny-skia

In any case, don't hesitate to open an issue, and I will do my best to help you!

Acknowledgements

  • A big shout-out to all the contributors of Sniffnet!

  • The graphical user interface has been realized with iced, a cross-platform GUI library for Rust focused on simplicity and type-safety

  • Last but not least, thanks to every single stargazer: all forms of support made it possible to keep improving Sniffnet!

sniffnet's People

Contributors

4r7if3x avatar abousis avatar acolombier avatar allcontributors[bot] avatar aloso avatar amadeusgraves avatar amarao avatar clr-cera avatar colin99d avatar crirock avatar cxw620 avatar dependabot[bot] avatar docraid avatar eatingdm avatar ervinpopescu avatar franciscobsalgueiro avatar fuzunspm avatar gyulyvgc avatar hirotake111 avatar imgbotapp avatar joshuamegnauth54 avatar kiruyuto avatar licheng-p avatar luca3s avatar marc-gav avatar mkadir avatar serhii-bilyk-intellias avatar starccy avatar vcrn avatar wangzishi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sniffnet's Issues

/dev/bpf0 permission denied on MacOS

Describe the bug
A clear and concise description of what the bug is.
(At first, I'm not proficient in OS and NW layers. So if my question is not clear, I'm sorry and please teach what you can't understand.)

I installed sniffnet on MacOS. But I got a permission error. Please teach me how to fix this.

To Reproduce
Describe steps to reproduce the bug, e.g.:

  1. Installed with the below commands
cargo install sniffnet
cargo run sniffnet
  1. When GUI appears, choose an interface and click run.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
I got the below message.

Screen Shot 2022-11-25 at 18 16 11

Desktop (please complete the following information):

  • OS: [e.g. MacOS, Linux, Windows]
    Screen Shot 2022-11-25 at 18 17 00

  • Browser [e.g. chrome, safari]

  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Errors occured when trying to run sniffnet: invalid UTF8 and failed to set hardware filter in promiscuous mode

Describe the bug
When I run Sniffnet after installing the dependencies, i got a error about utf 8

An error occured! libpcap returned invalid UTF-8 : invalid utf-8 sequence of 1 bytes from index 55

To Reproduce
Describe steps to reproduce the bug, e.g.:

  1. Launch Sniffnet
  2. Select IPV4/IPV6 and udp/tcp
  3. Click on RUN
  4. See error

Screenshots
image

Desktop (please complete the following information):

  • OS: [Windows 11 ]
  • Version [22H2]

Additional context

I understand that this is not a bug from Sniffnet but from libpcap, maybe the wrong version or maybe I missed something.
Can you help me understand the problem so i can solve it ?

thread 'thread_write_report' panic when run not as root. additionally, it'd be nice to save report file in a fixed location independently from running directory.

Describe the bug
When run not as root, sniffnet panics even with the capabilities set:

thread 'thread_write_report' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }', /home/burjui/.cargo/registry/src/github.com-1ecc6299db9ec823/sniffnet-1.0.1/src/thread_write_report.rs:36:49

Runs just fine under kdesu.

To Reproduce

$ sudo setcap cap_net_raw,cap_net_admin=eip ~/.cargo/bin/sniffnet
$ sniffnet

Desktop:
Manjaro Linux 22.0.0

thread 'main' panicked on launch (macOS)

Describe the bug
sniffnet panics immediately on launch on MacBook Pro w/ M1 Pro

To Reproduce
Describe steps to reproduce the bug, e.g.:

❯ RUST_BACKTRACE=full sniffnet

  /---------------------------------------------------------\
 |     _____           _    __    __                  _      |
 |    / ____|         (_)  / _|  / _|                | |     |
 |   | (___    _ __    _  | |_  | |_   _ __     ___  | |_    |
 |    \___ \  | '_ \  | | |  _| |  _| | '_ \   / _ \ | __|   |
 |    ____) | | | | | | | | |   | |   | | | | |  __/ | |_    |
 |   |_____/  |_| |_| |_| |_|   |_|   |_| |_|  \___|  \__|   |
 |                                                           |
 |                   ___________                             |
 |                  /___________\                            |
 |                 | ___________ |                           |
 |                 | |         | |                           |
 |                 | | v1.1.2  | |                           |
 |                 | |_________| |________________________   |
 |                 \_____________/   by Giuliano Bellini  )  |
 |                 / ''''''''''' \                       /   |
 |                / ::::::::::::: \                  =D-'    |
 |               (_________________)                         |
  \_________________________________________________________/
thread 'main' panicked at '', /Users/brew/Library/Caches/Homebrew/cargo_cache/registry/src/github.com-1ecc6299db9ec823/wgpu-hal-0.14.1/src/metal/adapter.rs:485:13
stack backtrace:
   0:        0x10271bf6c - __mh_execute_header
   1:        0x102469748 - __mh_execute_header
   2:        0x102701d94 - __mh_execute_header
   3:        0x10271bcc4 - __mh_execute_header
   4:        0x10270c3fc - __mh_execute_header
   5:        0x10270c0dc - __mh_execute_header
   6:        0x10244bb80 - __mh_execute_header
   7:        0x10270cb7c - __mh_execute_header
   8:        0x10271c63c - __mh_execute_header
   9:        0x10271c5ac - __mh_execute_header
  10:        0x10270c7cc - __mh_execute_header
  11:        0x1028206c8 - __mh_execute_header
  12:        0x1027f1314 - __mh_execute_header
  13:        0x1027fe5f8 - __mh_execute_header
  14:        0x1027fb32c - __mh_execute_header
  15:        0x1024361a8 - __mh_execute_header
  16:        0x1026af910 - __mh_execute_header
  17:        0x10244ab30 - __mh_execute_header
  18:        0x102686da8 - __mh_execute_header
  19:        0x10244de20 - __mh_execute_header

Desktop (please complete the following information):

  • OS: macOS 13.3

Faster way to write textual report file

I'd like to find a way to write the textual report in less time.
The textual report contains various [address:port] pairs with the relative statistics; as data are collected, it will become a larger file and will be re-written every time interval (5 seconds by default).

If you uncomment the lines from 26 to 28 of the Cargo.toml file you will be able to see on the standard output the time taken to write the report.
This is what you will see every time interval:
Screenshot 2022-09-12 at 18 18 25

The time I aim to reduce is the "Print map" time.
For every entry of the map, the key and the value are printed; I implemented the Display trait for both the key and the value using the format!(...) macro.

Currently, it takes about 100 ms to print a map of about 3500 entries (which corresponds to an output file of 50k lines) on my dual core computer.

I already tried implementing the Display trait using push_str(...) on a defined String::with_capacity(...) instead of format!(...) but the time does not improve.

The app was unable to start

Hello

Describe the bug
When program is launch, I've the following erroe: "The application was unable to start correctly (0x00007b)."

To Reproduce
Describe steps to reproduce the bug, e.g.:

  1. installed Npcap
  2. Put Npcap SDK in C:\Program Files\Npcap\SDK
  3. Add "LIB" system variable with value: "C:\Program Files\Npcap\SDK\Lib\x64"

Screenshots
Screenshot 2023-02-20 08h37m31s735

Desktop (please complete the following information):

  • OS: Windows 11 Pro 22H2 22621.1265

Thanks in advance for help

Linux also requires libfontconfig-dev

Hello,

I used cargo to install the app, but I got a compilation error. I had to run

sudo apt install libfontconfig-dev

I am running ubuntu jammy with kde

uname -a

Linux beast 5.15.0-53-generic #59-Ubuntu SMP Mon Oct 17 18:53:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/lsb-release

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS

I think this is probably just a doc update for the linux dependency dropdown. I would be happy to send a PR if you do not want to split it by distro

The error:

error: failed to run custom build command for `yeslogic-fontconfig-sys v3.2.0`

Caused by:
  process didn't exit successfully: `/rust/release/build/yeslogic-fontconfig-sys-9e5767d61a81af44/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=RUST_FONTCONFIG_DLOPEN
  cargo:rerun-if-env-changed=FONTCONFIG_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=FONTCONFIG_STATIC
  cargo:rerun-if-env-changed=FONTCONFIG_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "`\"pkg-config\" \"--libs\" \"--cflags\" \"fontconfig\"` did not exit successfully: exit status: 1\nerror: could not find system library 'fontconfig' required by the 'yeslogic-fontconfig-sys' crate\n\n--- stderr\nPackage fontconfig was not found in the pkg-config search path.\nPerhaps you should add the directory containing `fontconfig.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'fontconfig' found\n"', /home/me/.cargo/registry/src/github.com-1ecc6299db9ec823/yeslogic-fontconfig-sys-3.2.0/build.rs:8:48
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `sniffnet v1.0.0`, intermediate artifacts can be found at `/rust`

💻 Suggest me keyboard shortcuts to add 💻

I started introducing keyboard shortcuts to improve the efficiency of use and the overall user experience.

I have a few ideas about where to apply shortcuts but I'm unsure of the shortcut keys to be used, so feel free to give me some suggestions.

More shortcuts will be added and you can even suggest new ones.

Note

On macOS, use cmd instead of ctrl

Action Shortcut keys
Quit the application ctrl+Q
Open settings ctrl+,
Interrupt the ongoing analysis ctrl+backspace
Clear all notifications ctrl+D
Start the analysis and confirm modal actions enter
Close settings and modal popups esc
Switch from a tab to the next (or previous) one tab (or shift+tab)
Switch inspect table page to the next (or previous) one ctrl+rightArrow (or ctrl+leftArrow)

Error while installing on Linux Mint 19.3

When installing via "cargo install sniffnet", I got the following error message:

error: linking with cc failed: exit status: 1
|
= note: "cc" "-m64" "/tmp/cargo-installpg8AVH/release/deps/sniffnet-141f9bfdac14a619.sniffnet.40c2eb61-cgu.15.rcgu.o" "-Wl,--as-needed" "-L" "/tmp/cargo-installpg8AVH/release/deps" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/tmp/cargo-installpg8AVH/release/build/plotters-iced-9b76ee91b244b54c/out" "-L" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/rustcQjMUR3/libplotters_iced-64964f1fde9f8b2b.rlib" "-Wl,--start-group" "-Wl,--end-group" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-3e693007a886e005.rlib" "-Wl,-Bdynamic" "-lstdc++" "-lfontconfig" "-lfreetype" "-lpcap" "-ldl" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/tmp/cargo-installpg8AVH/release/deps/sniffnet-141f9bfdac14a619" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-Wl,-O1" "-nodefaultlibs"
= note: /usr/bin/ld: cannot find -lpcap
collect2: error: ld returned 1 exit status

error: could not compile sniffnet due to previous error
error: failed to compile sniffnet v1.0.0, intermediate artifacts can be found at /tmp/cargo-installpg8AVH

  1. I first installed cargo via terminal (sudo apt install cargo) with no errors
  2. I tried to install sniffnet via terminal (cargo install sniffnet)

The install-process took quite long and after reaching "compiling sniffnet" it stopped with the above mentioned error message.

Desktop

  • OS: Linux Mint 19.3 Cinnamon
  • Browser Firefox
  • Version 107.0

error_message_sniffnet

Remember settings on application closure

Hello there!

It would be awesome if the app could save settings, both for what adapter is being listened to and what are the filters applied (because most people won't keep switching between network adapters), and also any modification done in the settings pop-in, since at the moment none of that persists through the app closure. (Also I'd love to be able to set where the sniffnet_report folder should be.)

Basically that would mean looking up a setting file somewhere predefined like ~/.sniffnet on app startup and loading whatever values are written on initialisation, creating it with default values if absent, and writing to it on inspection start (maybe add a checkbox remember this setting so that it is not automatically saved for people actually using multiple adapters), and on either modification or exit on the settings pop-in.

Thanks for reading, and also thanks for the awesome app!

unable to install on Windows 11 ARM64 VM

Having an issue with install for a windows virtual machine on an mac m1 pro. trying to duplicate what the install would be like on a regular x64 machine.
I have tried both cargo and the provided MSI.

in the installation readme instructions, I have installed NPcap and downloaded the required npcap SDK but am unsure how to add the "Add the SDK's /Lib or /Lib/x64 folder to your LIB environment variable."
Tried googling to find some direction but haven't found anything useful.
Screenshot 2022-12-31 at 4 49 31 PM
Screenshot 2022-12-31 at 4 49 22 PM

Attached screenshots of errors when installing with Rust and running the sniffnet.exe after installing with the provided MSI.

Any direction would be greatly appreciated. thanks

Chinese translation WIP / 中文翻译仍在处理中

由于 #89 提到的问题, 目前暂未能将含有中文翻译的分支合并到主线. 已合并, 等待发版
Due to the problem that #89 mentioned, branch chinese_font_setup cannot be merge into master branch now.

在等待下一版本时, 有需要的, 可以下载我编译的预览版: sniffnet.zip, 或自行拉取chinese_font_setup编译.
If necessary, you can download sniffnet.zip, or compile by yourself.

解压然后直接替换位于C:\Program Files\sniffnet\bin处的sniffnet.exe文件即可.
Simply unzip the file and replace C:\Program Files\sniffnet\bin\sniffnet.exe.

文件校验:
HASH:

MD5 B196739024FFAE7FF221702B21991B95
SHA-1 093A9AAF0DA6BDBB38BD0E7A17FD7A79D95BE44E

CLI options

sniffnet --version should report version number (e.g. v1.0.0) without blocking or showing the GUI window.

sniffnet wlan0 should immediately start capture on specified interface, without the chooser window.

The "Open full report" button might resize awkwardly

Describe the bug
Sometimes, IPv6 addresses pop up on the list, and if the main window doesn't have enough room horizontally (e.g., when Sniffnet is not maximized), the "Open full report" button gets resized improperly, and the text inside of the button gets removed.

To Reproduce

  1. Unmaximize Sniffnet's window
  2. Resize the window to its lowest possible horizontal size
  3. Wait for an IPv6 address to show up on the list
  4. Notice how the "Open full report" button gets incorrectly resized

Expected behavior
The "Open full report" button should not be resized. Probably.

Screenshots

awkward-button-resize.mp4

Desktop (please complete the following information):

  • OS: Arch Linux
  • Version: 1.0.1

Terminal UI

Is your feature request related to a problem? Please describe.
I have a lot of systems that are only accessible via SSH and don't have a GUI installed, either because they're minimized servers/containers and/or because they run on SoC hardware with little resources available. Currently, I cannot use sniffnet on these systems. It would be really handy to be able to use sniffnet on these systems as well, e.g. for finding connections that hint to possible compromise of these systems.

Describe the solution you'd like
My suggestion is to make sniffnet available as a terminal unser interface (TUI) software as well, maybe using something like ncurses (I really don't know). If it's not possible to automatically find out if a user wants to run sniffnet in GUI or TUI mode, I'd suggest adding a CLI flag to enter TUI mode (thus keeping the current default of entering GUI if no arg is given).

Describe alternatives you've considered
The only alternative that I could think of would be to make sniffnet available via network in a browser and providing the UI in HTML5, because it's universally supported, but a) it would increase attack surface on the system because it means that likely a webserver with an open port is needed and b) it would probably draw more resources as well.

Additional context
No actual context, but I just installed sniffnet 1.0.0 on my Linux Mint 21 and I found it really neat. Thank you and keep up the great work!

dont compile on Ubuntu 2204

Describe the bug

just typed "cargo install sniffnet"

To Reproduce
cargo install sniffnet

Expected behavior
compile sniffnet cleanly

Screenshots
...
Compiling iced_core v0.7.0
Compiling wgpu-hal v0.14.1
Compiling iced_futures v0.5.1
Compiling iced_style v0.6.0
Compiling iced_native v0.8.0
Compiling image v0.24.5
Compiling ipnetwork v0.18.0
Compiling smithay-clipboard v0.6.6
Compiling sctk-adwaita v0.4.3
Compiling confy v0.5.1
Compiling maxminddb v0.23.0
Compiling iced_graphics v0.6.0
error[E0658]: generic associated types are unstable
--> /home/koublaski/.cargo/registry/src/github.com-1ecc6299db9ec823/iced_graphics-0.6.0/src/image/storage.rs:12:5
|
12 | type State<'a>;
| ^^^^^^^^^^^^^^^
|
= note: see issue #44265 rust-lang/rust#44265 for more information

For more information about this error, try rustc --explain E0658.
error: could not compile iced_graphics due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile sniffnet v1.1.0, intermediate artifacts can be found at /tmp/cargo-installT3ViYm

Desktop (please complete the following information):

  • OS: [e.g. MacOS, Linux, Windows]
    linux Ubuntu
    Distributor ID: Ubuntu
    Description: Ubuntu 22.04.1 LTS
    Release: 22.04
    Codename: jammy

Additional context

I have tried to "rustup update" but it doesn't change nothing.

Installing on RHEL based systems

Dear developers

Is your feature request related to a problem? Please describe.
We use RHEL based systems (CentOS and Rocky Linux) and currently, there are no rpm packages available for sniffnet.

Describe the solution you'd like
We would love to see rpm packages and/or an instruction for compiling and building sniffnet from source.

Describe alternatives you've considered
None.

Additional context
None.

Kind regards,

Pascal

Failing To Install on Windows 10 With Error lld-link: error: could not open 'wpcap.lib': no such file or directory

Issue Description
Failing To Install on Windows 10 With Error lld-link: error: could not open 'wpcap.lib': no such file or directory

To Reproduce
Steps to reproduce the bug, e.g.:

  1. Opened Windows Terminal / Shell
  2. Write cargo install sniffnet and press enter
  3. At The Final Compilation Step
  4. An Error Occur lld-link: error: could not open 'wpcap.lib': no such file or directory

Expected Behavior
sniffnet installed successfully

Screenshots / Shell Output

 cargo install sniffnet
    Updating crates.io index
  Installing sniffnet v0.4.0
    Updating crates.io index
   Compiling winapi v0.3.9
   Compiling proc-macro2 v1.0.43
   Compiling quote v1.0.21
   Compiling unicode-ident v1.0.3
   Compiling syn v1.0.99
   Compiling autocfg v1.1.0
   Compiling ucd-trie v0.1.5
   Compiling cfg-if v1.0.0
   Compiling version_check v0.9.4
   Compiling libc v0.2.132
   Compiling bitflags v1.3.2
   Compiling memchr v2.5.0
   Compiling crc32fast v1.3.2
   Compiling adler v1.0.2
   Compiling log v0.4.17
   Compiling lazy_static v1.4.0
   Compiling color_quant v1.1.0
   Compiling windows_x86_64_msvc v0.36.1
   Compiling byteorder v1.4.3
   Compiling regex-syntax v0.6.27
   Compiling weezl v0.1.7
   Compiling font-kit v0.11.0
   Compiling bytemuck v1.12.1
   Compiling jpeg-decoder v0.2.6
   Compiling plotters-backend v0.3.4
   Compiling os_str_bytes v6.3.0
   Compiling float-ord v0.2.0
   Compiling heck v0.4.0
   Compiling hashbrown v0.12.3
   Compiling textwrap v0.15.0
   Compiling once_cell v1.14.0
   Compiling ttf-parser v0.15.2
   Compiling arrayvec v0.7.2
   Compiling strsim v0.10.0
   Compiling thousands v0.2.0
   Compiling num-traits v0.2.15
   Compiling num-integer v0.1.45
   Compiling num-rational v0.4.1
   Compiling indexmap v1.9.1
   Compiling proc-macro-error-attr v1.0.4
   Compiling proc-macro-error v1.0.4
   Compiling miniz_oxide v0.5.4
   Compiling gif v0.11.4
   Compiling plotters-svg v0.3.3
   Compiling clap_lex v0.2.4
   Compiling etherparse v0.12.0
   Compiling flate2 v1.0.24
   Compiling aho-corasick v0.7.19
   Compiling windows-sys v0.36.1
   Compiling libloading v0.6.7
   Compiling winapi-util v0.1.5
   Compiling wio v0.2.2
   Compiling iana-time-zone v0.1.47
   Compiling atty v0.2.14
   Compiling time v0.1.44
   Compiling crossterm_winapi v0.4.0
   Compiling errno v0.2.8
   Compiling png v0.17.6
   Compiling regex v1.6.0
   Compiling same-file v1.0.6
   Compiling termcolor v1.1.3
   Compiling thiserror-impl v1.0.34
   Compiling dwrote v0.11.0
   Compiling colored v2.0.0
   Compiling crossterm v0.13.3
   Compiling chrono v0.4.22
   Compiling pcap v0.10.1
   Compiling walkdir v2.3.2
   Compiling clap_derive v3.2.18
   Compiling thiserror v1.0.34
   Compiling image v0.24.3
   Compiling pest v2.3.0
   Compiling clap v3.2.20
   Compiling semver-parser v0.10.2
   Compiling plotters-bitmap v0.3.2
   Compiling semver v0.11.0
   Compiling rustc_version v0.3.3
   Compiling pathfinder_simd v0.5.1
   Compiling pathfinder_geometry v0.5.1
   Compiling plotters v0.3.4
   Compiling sniffnet v0.4.0
error: linking with `lld-link` failed: exit code: 1
  |
  = note: "lld-link" "/NOLOGO" "C:\\Users\\DRJUNE~1\\AppData\\Local\\Temp\\rustc7JAQIh\\symbols.o" "C:\\Users\\DRJUNE~1\\AppData\\Local\\Temp\\cargo-installfyHKzO\\release\\deps\\sniffnet-fa3dbf1e9f7dad19.sniffnet.7e7680a5-cgu.3.rcgu.o" "/LIBPATH:C:\\Users\\DRJUNE~1\\AppData\\Local\\Temp\\cargo-installfyHKzO\\release\\deps" "/LIBPATH:C:\\Users\\DrJuneMoone\\.cargo\\registry\\src\\index.crates.io-e139d0d48fed7772\\windows_x86_64_msvc-0.36.1\\lib" "/LIBPATH:C:\\Users\\DrJuneMoone\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\Users\\DrJuneMoone\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-7738daf2e99ec4b2.rlib" "wpcap.lib" "legacy_stdio_definitions.lib" "windows.lib" "advapi32.lib" "cfgmgr32.lib" "d2d1.lib" "dwrite.lib" "dxgi.lib" "gdi32.lib" "kernel32.lib" "msimg32.lib" "ole32.lib" "opengl32.lib" "runtimeobject.lib" "user32.lib" "windowscodecs.lib" "winspool.lib" "advapi32.lib" "userenv.lib" "kernel32.lib" "ws2_32.lib" "bcrypt.lib" "libcmt.lib" "legacy_stdio_definitions.lib" "/NXCOMPAT" "/LIBPATH:C:\\Users\\DrJuneMoone\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "/OUT:C:\\Users\\DRJUNE~1\\AppData\\Local\\Temp\\cargo-installfyHKzO\\release\\deps\\sniffnet-fa3dbf1e9f7dad19.exe" "/OPT:REF,ICF" "/DEBUG:NONE"
  = note: lld-link: error: could not open 'wpcap.lib': no such file or directory


error: could not compile `sniffnet` due to previous error
error: failed to compile `sniffnet v0.4.0`, intermediate artifacts can be found at `C:\Users\DRJUNE~1\AppData\Local\Temp\cargo-installfyHKzO`

Desktop (please complete the following information):

  • OS: Windows 10
  • Rust 1.65 nightly-x86_64-pc-windows-msvc

Win 7?

Does this work with Win 7?

Thanks

WEB GUI

Describe the solution you'd like
A clear and concise description of what you want to happen.

if its possible to add web ui for use on server

Unable to launch sniffnet

Please, help me to solve this probllem while launching the app

:~$ sniffnet
sniffnet: /lib/x86_64-linux-gnu/libstdc++.so.6: version GLIBCXX_3.4.29' not found (required by sniffnet) sniffnet: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.33' not found (required by sniffnet)
sniffnet: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.32' not found (required by sniffnet) sniffnet: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.34' not found (required by sniffnet)


OS: LMDE 5 (elsie) x86_64
Kernel: 6.0.0-0.deb11.2-amd64

Fails to capture traffic from most non-physical interfaces

Describe the bug

It works for wlan0 or veth interfaces, but fails for non-Ethernet-like things like any or wireguard.

To Reproduce

  1. Install sniffnet v1.0.0 using cargo install sniffnet on Linux Debian 11.
  2. Start sniffnet.
  3. Choose e.g. any.

Expected behavior

It considers the same packets as e.g. tcpdump -i any.

Actual behavior

"No traffic can be observed because the adapter you selected has no active addresses"

or

"No traffic has been observed yet. Waiting for network packets..."

🌍 Help me translating Sniffnet in your native language 🌍

In v1.1 I introduced the possibility to select a language for the GUI.
If you are a native speaker of a language for which a translation isn't there yet (or a language that's not fully up to date), it'd be awesome if you could help me translating the application.

The translation is mostly appreciated if you think that the language is potentially spoken by a good amount of people using Sniffnet


➡️ All you have to do is to add the translations to these files:

Thanks in advance to everyone ❤️


Language Code Flag Updated to v1.1? Updated to v1.2? Updated to v1.3?
English EN 🇬🇧
German DE 🇩🇪 ✅ (#87) ✅ (#191)
Greek EL 🇬🇷 ✅ (#160)
Spanish ES 🇪🇦 ✅ (#70) ✅ (#203)
Persian* FA 🇮🇷 ✅ (#158) ✅ (#193)
Finnish FI 🇫🇮 ✅ (#310) ✅ (#310)
French FR 🇫🇷 ✅ (#64 - #67) ✅ (#279)
Italian IT 🇮🇹
Japanese JA 🇯🇵 ✅ (#343) ✅ (#343)
Korean KO 🇰🇷 ✅ (#128) ✅ (#205)
Polish PL 🇵🇱 ✅ (#78) ✅ (#244)
Portuguese PT 🇵🇹 ✅ (#134) ✅ (#398)
Romanian RO 🇷🇴 ✅ (#113) ✅ (#241)
Russian RU 🇷🇺 ✅ (#151) ✅ (#187)
Swedish SV 🇸🇪 ✅ (#213) ✅ (#213)
Turkish TR 🇹🇷 ✅ (#139) ✅ (#192)
Ukrainian UK 🇺🇦 ✅ (#94) ✅ (#216)
Uzbek UZ 🇺🇿 ✅ (#385) ✅ (#385)
Chinese ZH 🇨🇳 ✅ (#89 - #93) ✅ (#214)

*A Persian translation has been submitted and approved, but is not available in-app since RTL languages aren't supported yet by the GUI library in use.

Crashes on start on OS Gentoo stable

Describe the bug
When running

To Reproduce

  1. Build as normal user with: cargo install sniffnet
  2. run with: sudo /home/myuser/.cargo/bin/sniffnet
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/myuser/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-core-0.12.2/src/hub.rs:960:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Expected behavior
Sniffnet is starting

Desktop (please complete the following information):

  • OS: Gentoo stable

Additional context

% cargo install sniffnet                                                                                                                                                                                              (16:28 22.11.22)(0)
    Updating crates.io index
  Downloaded sniffnet v1.0.0
  Downloaded 1 crate (4.3 MB) in 2.74s
  Installing sniffnet v1.0.0
  Downloaded ahash v0.7.6
  Downloaded parking_lot v0.11.2
  Downloaded parking_lot_core v0.8.5
  Downloaded plotters-backend v0.3.4
  Downloaded pathfinder_geometry v0.5.1
  Downloaded plotters v0.3.4
  Downloaded same-file v1.0.6
  Downloaded static_assertions v1.1.0
  Downloaded rayon-core v1.10.1
  Downloaded lyon v0.17.10
  Downloaded ttf-parser v0.17.1
  Downloaded walkdir v2.3.2
  Downloaded lyon_algorithms v0.17.7
  Downloaded lyon_geom v0.17.7
  Downloaded plotters-iced v0.3.3
  Downloaded lyon_path v0.17.7
  Downloaded linked-hash-map v0.5.6
  Downloaded libloading v0.7.4
  Downloaded smithay-client-toolkit v0.15.4
  Downloaded thousands v0.2.0
  Downloaded plotters-svg v0.3.3
  Downloaded scoped-tls v1.0.1
  Downloaded approx v0.5.1
  Downloaded adler v1.0.2
  Downloaded arrayvec v0.5.2
  Downloaded bit-vec v0.6.3
  Downloaded memoffset v0.6.5
  Downloaded minimal-lexical v0.2.1
  Downloaded miniz_oxide v0.5.4
  Downloaded cmake v0.1.49
  Downloaded chrono v0.4.23
  Downloaded crc32fast v1.3.2
  Downloaded crossbeam-channel v0.5.6
  Downloaded crossbeam-deque v0.8.2
  Downloaded crossbeam-epoch v0.9.13
  Downloaded dirs-sys-next v0.1.2
  Downloaded errno v0.2.8
  Downloaded crossbeam-utils v0.8.14
  Downloaded gpu-alloc-types v0.2.0
  Downloaded flate2 v1.0.24
  Downloaded iana-time-zone v0.1.53
  Downloaded instant v0.1.12
  Downloaded image v0.24.5
  Downloaded raw-window-handle v0.3.4
  Downloaded nix v0.24.2
  Downloaded khronos-egl v4.1.0
  Downloaded wgpu-core v0.12.2
  Downloaded wgpu-hal v0.12.5
  Downloaded nom v7.1.1
  Downloaded wgpu_glyph v0.16.0
  Downloaded num-integer v0.1.45
  Downloaded num-traits v0.2.15
  Downloaded xcursor v0.3.4
  Downloaded block v0.1.6
  Downloaded bytemuck_derive v1.3.0
  Downloaded lyon_tessellation v0.17.10
  Downloaded mutate_once v0.1.1
  Downloaded copyless v0.1.5
  Downloaded const-cstr v0.3.0
  Downloaded clipboard_wayland v0.2.0
  Downloaded calloop v0.9.3
  Downloaded float-ord v0.2.0
  Downloaded euclid v0.22.7
  Downloaded freetype v0.7.0
  Downloaded glyph_brush v0.7.5
  Downloaded glyph_brush_draw_cache v0.1.5
  Downloaded gpu-alloc v0.5.3
  Downloaded gpu-descriptor-types v0.1.1
  Downloaded guillotiere v0.6.2
  Downloaded iced_style v0.4.0
  Downloaded iced_pure v0.2.2
  Downloaded iced_wgpu v0.5.1
  Downloaded iced_winit v0.4.0
  Downloaded renderdoc-sys v0.7.1
  Downloaded kamadak-exif v0.5.5
  Downloaded sid v0.6.1
  Downloaded semver-parser v0.10.2
  Downloaded ab_glyph_rasterizer v0.1.7
  Downloaded rustc_version v0.3.3
  Downloaded ttf-parser v0.15.2
  Downloaded bit-set v0.5.3
  Downloaded color_quant v1.1.0
  Downloaded dirs-next v2.0.0
  Downloaded downcast-rs v1.2.0
  Downloaded dlib v0.5.0
  Downloaded gethostname v0.2.3
  Downloaded cty v0.2.2
  Downloaded clipboard_x11 v0.4.0
  Downloaded glam v0.10.2
  Downloaded owned_ttf_parser v0.17.1
  Downloaded wayland-sys v0.29.5
  Downloaded arrayvec v0.7.2
  Downloaded pathfinder_simd v0.5.1
  Downloaded xml-rs v0.8.4
  Downloaded bytemuck v1.12.3
  Downloaded codespan-reporting v0.11.1
  Downloaded memoffset v0.7.1
  Downloaded libloading v0.6.7
  Downloaded hexf-parse v0.2.1
  Downloaded iced_futures v0.4.1
  Downloaded iced_core v0.5.0
  Downloaded inplace_it v0.3.5
  Downloaded glyph_brush_layout v0.2.3
  Downloaded raw-window-handle v0.4.3
  Downloaded font-kit v0.11.0
  Downloaded gpu-descriptor v0.2.3
  Downloaded float_next_after v0.1.5
  Downloaded ab_glyph v0.2.18
  Downloaded cfg_aliases v0.1.1
  Downloaded iced_graphics v0.3.1
  Downloaded iced_native v0.5.1
  Downloaded etherparse v0.12.0
  Downloaded glow v0.11.2
  Downloaded rayon v1.6.0
  Downloaded time v0.1.44
  Downloaded rustc-hash v1.1.0
  Downloaded num-rational v0.4.1
  Downloaded unicode-segmentation v1.10.0
  Downloaded wayland-client v0.29.5
  Downloaded wayland-commons v0.29.5
  Downloaded version_check v0.9.4
  Downloaded x11-dl v2.20.0
  Downloaded wayland-scanner v0.29.5
  Downloaded range-alloc v0.1.2
  Downloaded pcap v0.11.0
  Downloaded wayland-protocols v0.29.5
  Downloaded profiling v1.0.7
  Downloaded spirv v0.2.0+1.5.4
  Downloaded plotters-bitmap v0.3.2
  Downloaded ash v0.34.0+1.2.203
  Downloaded window_clipboard v0.2.3
  Downloaded wgpu v0.12.0
  Downloaded iced v0.4.2
  Downloaded memmap2 v0.5.8
  Downloaded ordered-float v3.4.0
  Downloaded memmap2 v0.3.1
  Downloaded gif v0.11.4
  Downloaded miniz_oxide v0.6.2
  Downloaded jpeg-decoder v0.3.0
  Downloaded wayland-cursor v0.29.5
  Downloaded nix v0.22.3
  Downloaded yeslogic-fontconfig-sys v3.2.0
  Downloaded wgpu-types v0.12.0
  Downloaded semver v0.11.0
  Downloaded png v0.17.7
  Downloaded x11rb v0.9.0
  Downloaded pest v2.4.1
  Downloaded smithay-client-toolkit v0.16.0
  Downloaded twox-hash v1.6.3
  Downloaded smithay-clipboard v0.6.6
  Downloaded ucd-trie v0.1.5
  Downloaded weezl v0.1.7
  Downloaded xi-unicode v0.3.0
  Downloaded svg_fmt v0.4.1
  Downloaded naga v0.8.5
  Downloaded winit v0.26.1
  Downloaded freetype-sys v0.13.1
  Downloaded 157 crates (12.4 MB) in 1.68s (largest was `freetype-sys` at 1.9 MB)
   Compiling autocfg v1.1.0
   Compiling libc v0.2.137
   Compiling cfg-if v1.0.0
   Compiling proc-macro2 v1.0.47
   Compiling unicode-ident v1.0.5
   Compiling quote v1.0.21
   Compiling bitflags v1.3.2
   Compiling syn v1.0.103
   Compiling pkg-config v0.3.26
   Compiling memchr v2.5.0
   Compiling log v0.4.17
   Compiling once_cell v1.16.0
   Compiling thiserror v1.0.37
   Compiling smallvec v1.10.0
   Compiling version_check v0.9.4
   Compiling lazy_static v1.4.0
   Compiling libloading v0.7.4
   Compiling xml-rs v0.8.4
   Compiling scopeguard v1.1.0
   Compiling futures-core v0.3.25
   Compiling cty v0.2.2
   Compiling dlib v0.5.0
   Compiling futures-channel v0.3.25
   Compiling futures-task v0.3.25
   Compiling raw-window-handle v0.4.3
   Compiling byteorder v1.4.3
   Compiling futures-util v0.3.25
   Compiling pin-project-lite v0.2.9
   Compiling futures-sink v0.3.25
   Compiling crossbeam-utils v0.8.14
   Compiling ppv-lite86 v0.2.17
   Compiling parking_lot_core v0.8.5
   Compiling ucd-trie v0.1.5
   Compiling ahash v0.7.6
   Compiling futures-io v0.3.25
   Compiling num-traits v0.2.15
   Compiling memoffset v0.6.5
   Compiling slab v0.4.7
   Compiling lock_api v0.4.9
   Compiling memoffset v0.7.1
   Compiling minimal-lexical v0.2.1
   Compiling pin-utils v0.1.0
   Compiling scoped-tls v1.0.1
   Compiling downcast-rs v1.2.0
   Compiling tokio v1.22.0
   Compiling crossbeam-epoch v0.9.13
   Compiling instant v0.1.12
   Compiling cc v1.0.77
   Compiling wayland-sys v0.29.5
   Compiling arrayvec v0.5.2
   Compiling static_assertions v1.1.0
   Compiling nom v7.1.1
   Compiling indexmap v1.9.2
   Compiling rustc-hash v1.1.0
   Compiling wayland-scanner v0.29.5
   Compiling num-integer v0.1.45
   Compiling iced_core v0.5.0
   Compiling bit-vec v0.6.3
   Compiling khronos-egl v4.1.0
   Compiling crc32fast v1.3.2
   Compiling termcolor v1.1.3
   Compiling rayon-core v1.10.1
   Compiling ttf-parser v0.17.1
   Compiling unicode-width v0.1.10
   Compiling ash v0.34.0+1.2.203
   Compiling adler v1.0.2
   Compiling crossbeam-deque v0.8.2
   Compiling codespan-reporting v0.11.1
   Compiling cmake v0.1.49
   Compiling bit-set v0.5.3
   Compiling iced_style v0.4.0
   Compiling crossbeam-channel v0.5.6
   Compiling smithay-client-toolkit v0.16.0
   Compiling glam v0.10.2
   Compiling gpu-descriptor-types v0.1.1
   Compiling gpu-alloc-types v0.2.0
   Compiling arrayvec v0.7.2
   Compiling hexf-parse v0.2.1
   Compiling cfg_aliases v0.1.1
   Compiling ab_glyph_rasterizer v0.1.7
   Compiling unicode-segmentation v1.10.0
   Compiling gpu-alloc v0.5.3
   Compiling wgpu-core v0.12.2
   Compiling euclid v0.22.7
   Compiling getrandom v0.2.8
   Compiling num_cpus v1.14.0
   Compiling nix v0.24.2
   Compiling rand_core v0.6.4
   Compiling rand_chacha v0.3.1
   Compiling hashbrown v0.12.3
   Compiling nix v0.22.3
   Compiling rand v0.8.5
   Compiling float_next_after v0.1.5
   Compiling parking_lot v0.11.2
   Compiling spirv v0.2.0+1.5.4
   Compiling sid v0.6.1
   Compiling wayland-client v0.29.5
   Compiling wayland-protocols v0.29.5
   Compiling lyon_geom v0.17.7
   Compiling freetype-sys v0.13.1
   Compiling memmap2 v0.5.8
   Compiling xcursor v0.3.4
   Compiling gpu-descriptor v0.2.3
   Compiling twox-hash v1.6.3
   Compiling lyon_path v0.17.7
   Compiling owned_ttf_parser v0.17.1
   Compiling ab_glyph v0.2.18
   Compiling wayland-commons v0.29.5
   Compiling lyon_algorithms v0.17.7
   Compiling lyon_tessellation v0.17.10
   Compiling miniz_oxide v0.5.4
   Compiling yeslogic-fontconfig-sys v3.2.0
   Compiling fxhash v0.2.1
   Compiling num-rational v0.4.1
   Compiling wgpu-types v0.12.0
   Compiling either v1.8.0
   Compiling inplace_it v0.3.5
   Compiling renderdoc-sys v0.7.1
   Compiling glow v0.11.2
   Compiling profiling v1.0.7
   Compiling rayon v1.6.0
   Compiling flate2 v1.0.24
   Compiling lyon v0.17.10
   Compiling gethostname v0.2.3
   Compiling approx v0.5.1
   Compiling miniz_oxide v0.6.2
   Compiling smithay-client-toolkit v0.15.4
   Compiling x11-dl v2.20.0
   Compiling xi-unicode v0.3.0
   Compiling wayland-cursor v0.29.5
   Compiling copyless v0.1.5
   Compiling color_quant v1.1.0
   Compiling linked-hash-map v0.5.6
   Compiling png v0.17.7
   Compiling glyph_brush_layout v0.2.3
   Compiling aho-corasick v0.7.20
   Compiling calloop v0.9.3
   Compiling x11rb v0.9.0
   Compiling memmap2 v0.3.1
   Compiling dirs-sys-next v0.1.2
   Compiling ordered-float v3.4.0
   Compiling regex-syntax v0.6.28
   Compiling font-kit v0.11.0
   Compiling jpeg-decoder v0.3.0
   Compiling plotters-backend v0.3.4
   Compiling weezl v0.1.7
   Compiling winit v0.26.1
   Compiling const-cstr v0.3.0
   Compiling glyph_brush_draw_cache v0.1.5
   Compiling same-file v1.0.6
   Compiling gif v0.11.4
   Compiling walkdir v2.3.2
   Compiling libloading v0.6.7
   Compiling glyph_brush v0.7.5
   Compiling dirs-next v2.0.0
   Compiling freetype v0.7.0
   Compiling time v0.1.44
   Compiling raw-window-handle v0.3.4
   Compiling mio v0.8.5
   Compiling percent-encoding v2.2.0
   Compiling mutate_once v0.1.1
   Compiling iana-time-zone v0.1.53
   Compiling float-ord v0.2.0
   Compiling svg_fmt v0.4.1
   Compiling thiserror-impl v1.0.37
   Compiling futures-macro v0.3.25
   Compiling bytemuck_derive v1.3.0
   Compiling chrono v0.4.23
   Compiling kamadak-exif v0.5.5
   Compiling guillotiere v0.6.2
   Compiling plotters-svg v0.3.3
   Compiling plotters-iced v0.3.3
   Compiling regex v1.7.0
   Compiling ttf-parser v0.15.2
   Compiling errno v0.2.8
   Compiling etherparse v0.12.0
   Compiling thousands v0.2.0
   Compiling bytemuck v1.12.3
   Compiling image v0.24.5
   Compiling pest v2.4.1
   Compiling naga v0.8.5
   Compiling smithay-clipboard v0.6.6
   Compiling semver-parser v0.10.2
   Compiling clipboard_wayland v0.2.0
   Compiling clipboard_x11 v0.4.0
   Compiling pcap v0.11.0
   Compiling semver v0.11.0
   Compiling window_clipboard v0.2.3
   Compiling rustc_version v0.3.3
   Compiling plotters-bitmap v0.3.2
   Compiling pathfinder_simd v0.5.1
   Compiling futures-executor v0.3.25
   Compiling futures v0.3.25
   Compiling iced_futures v0.4.1
   Compiling iced_native v0.5.1
   Compiling pathfinder_geometry v0.5.1
   Compiling wgpu-hal v0.12.5
   Compiling iced_pure v0.2.2
   Compiling plotters v0.3.4
   Compiling iced_graphics v0.3.1
   Compiling iced_winit v0.4.0
   Compiling wgpu v0.12.0
   Compiling wgpu_glyph v0.16.0
   Compiling iced_wgpu v0.5.1
   Compiling iced v0.4.2
   Compiling sniffnet v1.0.0
    Finished release [optimized] target(s) in 3m 40s
  Installing /home/myuser/.cargo/bin/sniffnet
   Installed package `sniffnet v1.0.0` (executable `sniffnet`)```

thread 'main' panicked at 'called `Result::unwrap()` - when "Open full Report" button is pressed

Describe the bug
After pressing the button "Open full Report" the program is crashing.

To Reproduce

  1. Install in your user with: cargo install sniffnet
  2. sudo sniffnet
  3. press Run
  4. press Open full Report
  5. see error

Expected behavior
See some advanced report

Program start
This is before error:
sudo sniffnet [sudo] Passwort für myuser: error: XDG_RUNTIME_DIR is invalid or not set in the environment.

Error
thread 'main' panicked at 'called Result::unwrap()on anErrvalue: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/myuser/.cargo/registry/src/github.com-1ecc6299db9ec823/sniffnet-1.0.0/src/gui/app.rs:102:22 note: run withRUST_BACKTRACE=1 environment variable to display a backtrace

thread 'main' panicked at 'called Result::unwrap()on anErrvalue: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/myuser/.cargo/registry/src/github.com-1ecc6299db9ec823/sniffnet-1.0.0/src/gui/app.rs:102:22 stack backtrace: 0: rust_begin_unwind at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:584:5 1: core::panicking::panic_fmt at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:142:14 2: core::result::unwrap_failed at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/result.rs:1814:5 3: iced_winit::application::update 4: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll 5: iced_winit::application::run::{{closure}} 6: winit::platform_impl::platform::EventLoop<T>::run_return 7: iced_winit::application::run 8: sniffnet::main note: Some details are omitted, run withRUST_BACKTRACE=full for a verbose backtrace.

Desktop:

  • OS: EndeavourOS + Gnome

Crash on Windows 10 right after start

sniffnet crashes on Windows 10 durectly after start with this message and backtrace:
thread 'main' panicked at 'called Option::unwrap() on a None value', src\main.rs:50:70
stack backtrace:
0: 0x7ff7b0f873b1 -
1: 0x7ff7b0d412ea -
2: 0x7ff7b0f6f8c9 -
3: 0x7ff7b0f895ab -
4: 0x7ff7b0f891c5 -
5: 0x7ff7b0f89ef9 -
6: 0x7ff7b0f89dda -
7: 0x7ff7b0f89d69 -
8: 0x7ff7b0f89d24 -
9: 0x7ff7b111e515 -
10: 0x7ff7b111e60c -
11: 0x7ff7b0ed87ac -
12: 0x7ff7b0ee2106 -
13: 0x7ff7b0ed68d8 -
14: 0x7ff7b111d18c -
15: 0x7fff4c5774b4 - BaseThreadInitThunk
16: 0x7fff4e4226a1 - RtlUserThreadStart

To reproduce:
Just start sniffnet.exe from the Windows 10 command lne.

I would expect to see the sniffed traffic.

Desktop : Windows 10

Include WPCAP on installation?

wpcap

Hey guys, wouldn't it be cool to embed wpcap on installation so it can be a little bit more 'mainstream'?

Testing the software now, thanks <3.

Permission denied on macOS

Describe the bug
Screenshot 2022-11-22 at 10 46 30

To Reproduce

  1. Install the macOS app via dmg file
  2. Run it for the first time with the right click => Open
  3. Try to capture packets from en0

Expected behavior
Should probably ask for privileges to run with admin rights

Desktop (please complete the following information):

  • macOS Ventura 13.0.1

NetBSD package ready to merge

Hi,

I've just packaged sniffnet for pkgsrc/NetBSD.

Describe the solution you'd like
We have a script that reads Cargo.lock and generates a file listing all cargo dependencies, like this
When Cargo.lock is hidden by .gitignore, I need to do this manually. Please consider removing Cargo.lock from .gitignore.

I'll merge the package into our main branch later today, just want to test it a bit more.

Avoid dealignment of report when longer addresses are received

Currently, when addresses longer than 25 characters are received, the report row will look like this:

Screenshot 2023-02-08 at 08 35 38

causing a dealignment of its text fields.

I was not able to reproduce this case on my PC and I think it's not a so common case, but it was first documented in issue #48.

I partially solved that issue introducing a horizontal scrollbar, as you can see from the picture, but I'd like to find a better solution for the long term.

The best solution would be to use a table widget, but iced doesn't support it yet.

Mangled UI display

Describe the bug
Mangled UI display

To Reproduce
From bash, run sniffnet:
$ sniffnet
I also get the following warning:
MESA-INTEL: warning: Haswell Vulkan support is incomplete

Screenshots
Screenshot from 2022-11-22 10-59-12

Desktop (please complete the following information):

  • OS: Fedora 36
  • Version 1.0.0

Can't start sniffnet

Describe the bug
A clear and concise description of what the bug is.

I installed sniffnet via cargo and do sudo setcap cap_net_raw,cap_net_admin=eip ~/.cargo/bin/sniffnet
and try after this start sniffnet, I see this in terminal

thread 'main' panicked at 'Failed to initialize any backend! Wayland status: XdgRuntimeDirNotSet X11 status: XOpenDisplayFailed', /home/roland/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.26.1/src/platform_impl/linux/mod.rs:619:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

To Reproduce
Describe steps to reproduce the bug, e.g.:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. MacOS, Linux, Windows]
    Linux, Sway in Wayland only mode
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]
    v1.0.0 sniffnet
    rustc 1.65.0 (897e37553 2022-11-02)

Additional context
Add any other context about the problem here.

Changing the height of the Window causes a crash

Describe the bug
Changing the height of the Window causes the program to crash with this error:

thread 'main' panicked at 'wgpu error: Validation Error

Caused by:
    In a RenderPass
      note: encoder = `iced_wgpu encoder`
    In a set_scissor_rect command
    Invalid ScissorRect parameters

To Reproduce
Describe steps to reproduce the bug, e.g.:

  1. Install using cargo install
  2. run the program and press Run!
  3. Start dragging using the bottom edge and go slowly up shrinking the window
  4. When the height of the window is around 3cm it will crash.

Screenshots

Peek 2022-11-21 14-44

Desktop (please complete the following information):

  • OS: Ubuntu 20.04

Additional context
Add any other context about the problem here.

Windows10 : wpcap.dll not found at program start

Describe the bug
Sniffnet not starting due to missing dependecy npcap.dll

To Reproduce

  1. Installed sniffnet using provided MSI
  2. Start program using desktop icon
  3. Windows opens a "Systemerror window" (screenshot attached)
  4. Reinstall (was installed before) NPcap-1.71 again with default options
  5. Reboot
  6. Start program using desktop icon (again)
  7. Windows again opens a "Systemerror window" (screenshot attached)

Expected behavior
Program should start, detect needed capture library which is present on the system and present GUI

Screenshots
sniffnet_windows10_missing_wpcap

Desktop (please complete the following information):

  • MS Windows 10 , 22H2 , Build 19045.2311
  • NPcap 1.71
  • Wireshark using same NPcap is working well

Additional context

  • NPcap SDK (LIB variable) was added as described in the WIndows install section
  • Screenshot on German system "Systemfehler" means "System Error". "nicht gefunden" = "not found"

cargo install sniffnet failed on windows 10 msvc toolchain

Describe the bug
A clear and concise description of what the bug is.
When exceute cargo install sniffnet, the compiler returns "= note: LINK : fatal error LNK1181: cannot open input file 'wpcap.lib'" errro message.

To Reproduce
Describe steps to reproduce the bug, e.g.:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. MacOS, Linux, Windows]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Windows: thread 'thread_write_report' panicked at 'called `Result::unwrap()` on an `Err` value

Error when starting sniffnet.exe executable, the shown error from executing sniffnet from cmd line is below.
I used instructions in section Install and Run -> Windows dependencies Ncap installed and Npcap SDK added to LIB env variable.

thread 'thread_write_report' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." }', src\thread_write_report.rs:34:49
stack backtrace:
   0:     0x7ff7f17673b1 - <unknown>
   1:     0x7ff7f15212ea - <unknown>
   2:     0x7ff7f174f8c9 - <unknown>
   3:     0x7ff7f17695ab - <unknown>
   4:     0x7ff7f17691c5 - <unknown>
   5:     0x7ff7f16ba162 - <unknown>
   6:     0x7ff7f176a062 - <unknown>
   7:     0x7ff7f1769e03 - <unknown>
   8:     0x7ff7f1769d69 - <unknown>
   9:     0x7ff7f1769d24 - <unknown>
  10:     0x7ff7f18fe515 - <unknown>
  11:     0x7ff7f18fe7d3 - <unknown>
  12:     0x7ff7f16b31e2 - <unknown>
  13:     0x7ff7f16c2119 - <unknown>
  14:     0x7ff7f1730599 - <unknown>
  15:     0x7ff7f1764d2b - <unknown>
  16:     0x7ffac1ad74b4 - BaseThreadInitThunk
  17:     0x7ffac2ba26a1 - RtlUserThreadStart

Der Prozedureinsprungspunkt 'pcap_set_immediate_mode" wurde in der DLL "C:\Program Files"\sniffnet\bin\sniffnet.exe" nicht gefunden

Black windows on screen and messagebox after start:
Der Prozedureinsprungspunkt 'pcap_set_immediate_mode" wurde in der DLL "C:\Program Files"\sniffnet\bin\sniffnet.exe" nicht gefunden
[OK]
After click on [OK] messagebox and black window close.

I've WinPcap 4.1.3 (latest version) installed
Just starting Sniffnet by clicking the icon. No difference when starting as administrator.

Expected behavior
No error msgbox and starting normally.

Pressing `Open full report` causes a crash on Linux

Describe the bug
Pressing open full report causes a crash on Linux.

Solution: Instead of using the command open for linux here you should probably use xdg-open. I solved this error on my machine by doing sudo ln -s /usr/bin/xdg-open /usr/bin/open.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04

Diagnostic messages should be copyable from the window

E.g. "No traffic can be observed because the adapter you selected has no active addresses" should be easy to copy and paste to a bug report.

Alternatively, some of the messages displayed in GUI can be duplicated to stderr.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.