mirror of
https://github.com/GyulyVGC/sniffnet.git
synced 2025-12-23 22:29:01 -05:00
minor fixes
This commit is contained in:
@@ -330,13 +330,14 @@ ## Supported network services
|
||||
|
||||
Please, remember that this is just a convention:
|
||||
|
||||
> **Warning**
|
||||
> [!WARNING]
|
||||
>
|
||||
> The Internet Assigned Numbers Authority (IANA) is responsible for maintaining
|
||||
> the official assignments of port numbers for specific uses. <br>
|
||||
> However, many unofficial uses of well-known port numbers occur in practice.
|
||||
|
||||
The full list of services is generated from Nmap's service collection and is available in the file `services.txt`.
|
||||
Sniffnet's list of services is generated from [Nmap's service collection](https://nmap.org/book/nmap-services.html)
|
||||
and is available in the file [`services.txt`](https://raw.githubusercontent.com/GyulyVGC/sniffnet/main/services.txt).
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
6
build.rs
6
build.rs
@@ -31,8 +31,8 @@ fn set_icon() {
|
||||
}
|
||||
|
||||
fn build_services_phf() {
|
||||
let path = Path::new(&env::var("OUT_DIR").unwrap()).join("services.rs");
|
||||
let mut file = BufWriter::new(File::create(path).unwrap());
|
||||
let out_path = Path::new(&env::var("OUT_DIR").unwrap()).join("services.rs");
|
||||
let mut output = BufWriter::new(File::create(out_path).unwrap());
|
||||
|
||||
let mut services_map = phf_codegen::Map::new();
|
||||
|
||||
@@ -53,7 +53,7 @@ fn build_services_phf() {
|
||||
assert_eq!(num_entries, 12066);
|
||||
|
||||
writeln!(
|
||||
&mut file,
|
||||
&mut output,
|
||||
"#[allow(clippy::unreadable_literal)]\n\
|
||||
static SERVICES: phf::Map<ServiceQuery, Service> = {};",
|
||||
services_map.build()
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WARNING: this file is imported in build.rs
|
||||
|
||||
/// Enum representing the possible observed values of protocol.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
#[allow(clippy::upper_case_acronyms)]
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WARNING: this file is imported in build.rs
|
||||
|
||||
use std::hash::Hash;
|
||||
|
||||
/// Used to query the phf services map (key of the map).
|
||||
|
||||
Reference in New Issue
Block a user