From 1e582d9ab84e997212665d52edd1afb331f1b358 Mon Sep 17 00:00:00 2001 From: Giuliano Bellini s294739 Date: Fri, 19 Jul 2024 15:55:30 +0200 Subject: [PATCH 1/6] update upper layer service list --- build.rs | 3 ++- services.txt | 12 ++++++++++++ src/networking/manage_packets.rs | 4 ++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/build.rs b/build.rs index 6b5baf2c4..8d3b2a2dc 100644 --- a/build.rs +++ b/build.rs @@ -52,7 +52,7 @@ fn build_services_phf() { services_map.entry(key, &val); num_entries += 1; } - assert_eq!(num_entries, 12066); + assert_eq!(num_entries, 12078); writeln!( &mut output, @@ -189,6 +189,7 @@ pub static SAFE_WORDS_FOR_SERVICE_NAME: Lazy = Lazy::new(|| { "dhanalakshmi", "3gpp-w1ap", "pmsm-webrctl", + "bif-p2p", ] { safe_words.set(word, Type::SAFE); } diff --git a/services.txt b/services.txt index 89cc2582a..68e24b1e5 100644 --- a/services.txt +++ b/services.txt @@ -1384,6 +1384,8 @@ apex-mesh 912/tcp apex-mesh 912/udp apex-edge 913/tcp apex-edge 913/udp +rift-lies 914/tcp +rift-ties 915/tcp oftep-rpc 950/tcp rndc 953/tcp securenetpro-sensor 975/tcp @@ -4093,6 +4095,7 @@ service-ctrl 2367/tcp service-ctrl 2367/udp opentable 2368/tcp opentable 2368/udp +bif-p2p 2369/tcp l3-hbmon 2370/tcp l3-hbmon 2370/udp worldwire 2371/tcp @@ -8941,6 +8944,7 @@ sdlog 5520/tcp sdserv 5530/tcp sdreport 5540/tcp sdxauthd 5540/udp +qftest-licserve 5543/tcp sdadmind 5550/tcp sgi-eventmond 5553/tcp sgi-eventmond 5553/udp @@ -10358,6 +10362,7 @@ senomix07 8058/udp senomix08 8059/tcp senomix08 8059/udp aero 8060/tcp +nikatron-dev 8061/tcp toad-bi-appsrvr 8066/tcp infi-async 8067/tcp ucs-isc 8070/tcp @@ -10516,6 +10521,7 @@ espeech-rtp 8417/tcp espeech-rtp 8417/udp aritts 8423/tcp pgbackrest 8432/tcp +aws-as2 8433/tcp cybro-a-bus 8442/tcp cybro-a-bus 8442/udp https-alt 8443/tcp @@ -10523,6 +10529,7 @@ pcsync-https 8443/udp pcsync-http 8444/tcp pcsync-http 8444/udp copy 8445/tcp +matrix-fed 8448/tcp npmp 8450/tcp npmp 8450/udp nexentamv 8457/tcp @@ -10562,6 +10569,7 @@ canon-bjnp4 8614/udp imink 8615/tcp monetra 8665/tcp monetra-admin 8666/tcp +spartan 8668/tcp msi-cps-rm 8675/tcp sun-as-jmxrmi 8686/tcp sun-as-jmxrmi 8686/udp @@ -11209,6 +11217,7 @@ warehouse 12322/udp netbus 12345/tcp italk 12345/udp netbus 12346/tcp +carb-repl-ctrl 12546/tcp tsaf 12753/tcp tsaf 12753/udp netperf 12865/tcp @@ -11267,6 +11276,7 @@ dsmcc-download 13821/udp dsmcc-ccp 13822/tcp dsmcc-ccp 13822/udp bmdss 13823/tcp +a-trust-rpc 13832/tcp ucontrol 13894/tcp dta-systems 13929/tcp dta-systems 13929/udp @@ -11666,6 +11676,7 @@ icl-twobase9 25008/tcp icl-twobase9 25008/udp icl-twobase10 25009/tcp icl-twobase10 25009/udp +db2c-tls 25100/tcp rna 25471/tcp minecraft 25565/tcp sauterdongle 25576/tcp @@ -11962,6 +11973,7 @@ candrp 42509/tcp candrp 42509/udp caerpc 42510/tcp caerpc 42510/udp +curiosity 42999/tcp recvr-rc 43000/tcp reachout 43188/tcp reachout 43188/udp diff --git a/src/networking/manage_packets.rs b/src/networking/manage_packets.rs index b4961118b..86bc28b70 100644 --- a/src/networking/manage_packets.rs +++ b/src/networking/manage_packets.rs @@ -1303,7 +1303,7 @@ mod tests { #[test] fn test_all_services_map_key_and_values_are_valid() { - assert_eq!(SERVICES.len(), 12066); + assert_eq!(SERVICES.len(), 12078); let mut distinct_services = HashSet::new(); for (sq, s) in &SERVICES { // only tcp or udp @@ -1324,7 +1324,7 @@ mod tests { // just to count and verify number of distinct services distinct_services.insert(name.to_string()); } - assert_eq!(distinct_services.len(), 6438); + assert_eq!(distinct_services.len(), 6450); } #[test] From d2961aa4ddf47d06dbb125121183cd01f2d6bbd6 Mon Sep 17 00:00:00 2001 From: Giuliano Bellini s294739 Date: Fri, 19 Jul 2024 15:57:57 +0200 Subject: [PATCH 2/6] update deps --- Cargo.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8904682cc..88b9f4bf1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -573,9 +573,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "324c74f2155653c90b04f25b2a47a8a631360cb908f92a772695f430c7e31052" +checksum = "2aba8f4e9906c7ce3c73463f62a7f0c65183ada1a2d47e397cc8810827f9694f" dependencies = [ "jobserver", "libc", @@ -3772,9 +3772,9 @@ dependencies = [ [[package]] name = "sdd" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb0dde0ccd15e337a3cf738a9a38115c6d8e74795d074e73973dad3d229a897" +checksum = "85f05a494052771fc5bd0619742363b5e24e5ad72ab3111ec2e27925b8edc5f3" [[package]] name = "security-framework" @@ -4330,18 +4330,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.62" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.62" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", @@ -5625,9 +5625,9 @@ checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" [[package]] name = "xcursor" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a0ccd7b4a5345edfcd0c3535718a4e9ff7798ffc536bb5b5a0e26ff84732911" +checksum = "d491ee231a51ae64a5b762114c3ac2104b967aadba1de45c86ca42cf051513b7" [[package]] name = "xdg-home" From 0c8801e1aa7c40322514857ffea5dca758ad5707 Mon Sep 17 00:00:00 2001 From: Giuliano Bellini s294739 Date: Fri, 19 Jul 2024 16:06:16 +0200 Subject: [PATCH 3/6] optimize imports --- src/mmdb/types/mmdb_asn_entry.rs | 3 ++- src/mmdb/types/mmdb_country_entry.rs | 3 ++- src/mmdb/types/mmdb_reader.rs | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mmdb/types/mmdb_asn_entry.rs b/src/mmdb/types/mmdb_asn_entry.rs index 32c519da9..ec1ad81f1 100644 --- a/src/mmdb/types/mmdb_asn_entry.rs +++ b/src/mmdb/types/mmdb_asn_entry.rs @@ -1,6 +1,7 @@ -use crate::networking::types::asn::Asn; use serde::Deserialize; +use crate::networking::types::asn::Asn; + #[derive(Deserialize)] pub struct MmdbAsnEntry<'a> { #[serde(alias = "autonomous_system_number", alias = "asn")] diff --git a/src/mmdb/types/mmdb_country_entry.rs b/src/mmdb/types/mmdb_country_entry.rs index ea873cc07..18fa047d3 100644 --- a/src/mmdb/types/mmdb_country_entry.rs +++ b/src/mmdb/types/mmdb_country_entry.rs @@ -1,6 +1,7 @@ -use crate::countries::types::country::Country; use serde::Deserialize; +use crate::countries::types::country::Country; + #[derive(Deserialize)] #[serde(transparent)] pub struct MmdbCountryEntry<'a> { diff --git a/src/mmdb/types/mmdb_reader.rs b/src/mmdb/types/mmdb_reader.rs index 23e246d26..8ffd295a2 100644 --- a/src/mmdb/types/mmdb_reader.rs +++ b/src/mmdb/types/mmdb_reader.rs @@ -1,6 +1,7 @@ +use std::net::IpAddr; + use maxminddb::{MaxMindDBError, Reader}; use serde::Deserialize; -use std::net::IpAddr; pub enum MmdbReader { Default(Reader<&'static [u8]>), From fad592cf2908be4cfcc8feee3d94b7a469e76b51 Mon Sep 17 00:00:00 2001 From: Giuliano Bellini s294739 Date: Fri, 19 Jul 2024 16:18:11 +0200 Subject: [PATCH 4/6] fix clippy pedantic lints --- src/mmdb/types/mmdb_asn_entry.rs | 2 +- src/mmdb/types/mmdb_country_entry.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mmdb/types/mmdb_asn_entry.rs b/src/mmdb/types/mmdb_asn_entry.rs index ec1ad81f1..cf83091bb 100644 --- a/src/mmdb/types/mmdb_asn_entry.rs +++ b/src/mmdb/types/mmdb_asn_entry.rs @@ -30,7 +30,7 @@ impl MmdbAsnCode<'_> { fn get_code(&self) -> String { match self { Self::Int(Some(code)) => code.to_string(), - Self::Str(Some(code)) => code.to_string(), + Self::Str(Some(code)) => (*code).to_string(), _ => String::new(), } } diff --git a/src/mmdb/types/mmdb_country_entry.rs b/src/mmdb/types/mmdb_country_entry.rs index 18fa047d3..fffa5b6e2 100644 --- a/src/mmdb/types/mmdb_country_entry.rs +++ b/src/mmdb/types/mmdb_country_entry.rs @@ -29,8 +29,8 @@ impl MmdbCountryEntryInner<'_> { match self { Self::Standard(StandardCountryEntry { country: Some(StandardCountryEntryInner { iso_code: Some(c) }), - }) => Country::from_str(c), - Self::Ipinfo(IpinfoCountryEntry { country: Some(c) }) => Country::from_str(c), + }) + | Self::Ipinfo(IpinfoCountryEntry { country: Some(c) }) => Country::from_str(c), _ => Country::ZZ, } } From f506825e1da96f7a6c07ae1f161be0cb1657a2af Mon Sep 17 00:00:00 2001 From: Giuliano Bellini s294739 Date: Sat, 20 Jul 2024 21:43:50 +0200 Subject: [PATCH 5/6] bump version to 1.3.1 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 88b9f4bf1..69239bae5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4059,7 +4059,7 @@ dependencies = [ [[package]] name = "sniffnet" -version = "1.3.0" +version = "1.3.1" dependencies = [ "chrono", "confy", diff --git a/Cargo.toml b/Cargo.toml index 8e8c53c47..ff83fc336 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sniffnet" -version = "1.3.0" +version = "1.3.1" authors = ["Giuliano Bellini "] edition = "2021" description = "Application to comfortably monitor your network traffic" From b1abe68dc5a8639b138f34c5678c16b709d5149c Mon Sep 17 00:00:00 2001 From: Giuliano Bellini s294739 Date: Mon, 22 Jul 2024 10:46:31 +0200 Subject: [PATCH 6/6] update CHANGELOG --- CHANGELOG.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fea7b255..07d7c08b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,20 +2,20 @@ All Sniffnet releases with the relative changes are documented in this file. -## [UNRELEASED] +## [1.3.1] - 2024-07-22 - Thumbnail mode improvements ([#512](https://github.com/GyulyVGC/sniffnet/pull/512)) - Support IPinfo ASN and Country databases ([#558](https://github.com/GyulyVGC/sniffnet/pull/558) β€” fixes [#533](https://github.com/GyulyVGC/sniffnet/issues/533)) - Added keyboard shortcuts to change zoom level (fixes [#554](https://github.com/GyulyVGC/sniffnet/issues/554)) - Increased the range of selectable zoom values (fixes [#542](https://github.com/GyulyVGC/sniffnet/issues/542)) - Updated some of the existing translations to v1.3: - - French - [#494](https://github.com/GyulyVGC/sniffnet/pull/494) - - German - [#495](https://github.com/GyulyVGC/sniffnet/pull/495) - - Russian - [#496](https://github.com/GyulyVGC/sniffnet/pull/496) - - Polish - [#498](https://github.com/GyulyVGC/sniffnet/pull/498) - - Romanian - [#499](https://github.com/GyulyVGC/sniffnet/pull/499) - - Japanese - [#504](https://github.com/GyulyVGC/sniffnet/pull/504) - - Uzbek - [#510](https://github.com/GyulyVGC/sniffnet/pull/510) - - Swedish - [#522](https://github.com/GyulyVGC/sniffnet/pull/522) + - French ([#494](https://github.com/GyulyVGC/sniffnet/pull/494)) + - German ([#495](https://github.com/GyulyVGC/sniffnet/pull/495)) + - Russian ([#496](https://github.com/GyulyVGC/sniffnet/pull/496)) + - Polish ([#498](https://github.com/GyulyVGC/sniffnet/pull/498)) + - Romanian ([#499](https://github.com/GyulyVGC/sniffnet/pull/499)) + - Japanese ([#504](https://github.com/GyulyVGC/sniffnet/pull/504)) + - Uzbek ([#510](https://github.com/GyulyVGC/sniffnet/pull/510)) + - Swedish ([#522](https://github.com/GyulyVGC/sniffnet/pull/522)) - Reduced `String` allocations in translation code ([#524](https://github.com/GyulyVGC/sniffnet/pull/524)) - Fixed impossibility to exit thumbnail mode in some Linux distributions (fixes [#505](https://github.com/GyulyVGC/sniffnet/pull/505)) @@ -81,16 +81,16 @@ All Sniffnet releases with the relative changes are documented in this file. - Added button to clear all the current search filters quickly in inspect page - Added Swedish translation πŸ‡ΈπŸ‡ͺ ([#213](https://github.com/GyulyVGC/sniffnet/pull/213)) - Updated most of the existing translations to v1.2: - - German - [#191](https://github.com/GyulyVGC/sniffnet/pull/191) - - Spanish - [#203](https://github.com/GyulyVGC/sniffnet/pull/203) - - Persian - [#193](https://github.com/GyulyVGC/sniffnet/pull/193) - - Korean - [#205](https://github.com/GyulyVGC/sniffnet/pull/205) - - Polish - [#244](https://github.com/GyulyVGC/sniffnet/pull/244) - - Romanian - [#241](https://github.com/GyulyVGC/sniffnet/pull/241) - - Russian - [#187](https://github.com/GyulyVGC/sniffnet/pull/187) - - Turkish - [#192](https://github.com/GyulyVGC/sniffnet/pull/192) - - Ukrainian - [#216](https://github.com/GyulyVGC/sniffnet/pull/216) - - Chinese - [#214](https://github.com/GyulyVGC/sniffnet/pull/214) + - German ([#191](https://github.com/GyulyVGC/sniffnet/pull/191)) + - Spanish ([#203](https://github.com/GyulyVGC/sniffnet/pull/203)) + - Persian ([#193](https://github.com/GyulyVGC/sniffnet/pull/193)) + - Korean ([#205](https://github.com/GyulyVGC/sniffnet/pull/205)) + - Polish ([#244](https://github.com/GyulyVGC/sniffnet/pull/244)) + - Romanian ([#241](https://github.com/GyulyVGC/sniffnet/pull/241)) + - Russian ([#187](https://github.com/GyulyVGC/sniffnet/pull/187)) + - Turkish ([#192](https://github.com/GyulyVGC/sniffnet/pull/192)) + - Ukrainian ([#216](https://github.com/GyulyVGC/sniffnet/pull/216)) + - Chinese ([#214](https://github.com/GyulyVGC/sniffnet/pull/214)) - Renamed "Administrative entity" to "Autonomous System name" to avoid confusion - Improved filter columns relative width to avoid the "Application protocol" label being cut when displayed in Swedish - Footer URLs have been updated to include links to Sniffnet's official website and GitHub Sponsor page