Skip to content

Commit 74aaafd

Browse files
committed
fixed linting errors and added issue template for protocol request
1 parent a562555 commit 74aaafd

19 files changed

Lines changed: 213 additions & 112 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: 🚀 Protocol Support Request
2+
description: Request support for a new network protocol (L4/L7)
3+
labels: ["enhancement", "protocol"]
4+
body:
5+
- type: textarea
6+
id: protocol_description
7+
attributes:
8+
label: Protocol Overview
9+
description: Provide a high-level description of the protocol.
10+
placeholder: e.g. MQTT is a lightweight publish/subscribe messaging transport...
11+
validations:
12+
required: true
13+
- type: input
14+
id: port_ranges
15+
attributes:
16+
label: Port Numbers / Ranges
17+
description: What are the standard/common ports used by this protocol?
18+
placeholder: e.g. 1883, 8883
19+
- type: dropdown
20+
id: transport
21+
attributes:
22+
label: Transport Layer
23+
options:
24+
- TCP
25+
- UDP
26+
- SCTP
27+
- Other
28+
- type: textarea
29+
id: use_case
30+
attributes:
31+
label: Use Case
32+
description: How would Zond users benefit from this protocol support?
33+
placeholder: e.g. Critical for discovering IoT devices on enterprise networks.
34+
- type: textarea
35+
id: documentation
36+
attributes:
37+
label: Documentation / RFCs
38+
description: Please provide links to technical specifications or RFCs.
39+
placeholder: e.g. https://docs.oasis-open.org/mqtt/mqtt/v5.0/mqtt-v5.0.html
40+
validations:
41+
required: true
42+
- type: checkbox
43+
id: priority
44+
attributes:
45+
label: Desired Depth
46+
options:
47+
- label: Basic Port Identification
48+
- label: Service Fingerprinting (Banner Grabbing)
49+
- label: Deep Probing (e.g. listing topics/resources)

cli/src/terminal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ pub mod banner;
88
pub mod colors;
99
pub mod format;
1010
pub mod host;
11+
pub mod insights;
1112
pub mod logging;
1213
pub mod network_fmt;
1314
pub mod print;
1415
pub mod spinner;
15-
pub mod insights;

cli/src/terminal/spinner.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ use std::sync::Arc;
2828
use std::sync::atomic::{AtomicBool, Ordering};
2929
use std::time::Duration;
3030

31+
use crate::terminal::insights;
3132
use colored::*;
3233
use indicatif::ProgressStyle;
3334
use tracing::Span;
3435
use tracing_indicatif::{IndicatifLayer, span_ext::IndicatifSpanExt};
3536
use tracing_subscriber::{EnvFilter, layer::SubscriberExt, util::SubscriberInitExt};
36-
use crate::terminal::insights;
3737

3838
use crate::terminal::{colors, logging};
3939

common/src/config.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
// If a copy of the MPL was not distributed with this file, You can obtain one at
55
// https://mozilla.org/MPL/2.0/.
66

7-
8-
97
/// Global configuration options for the scanner execution.
108
///
119
/// This struct controls the runtime behavior of the application, including
@@ -30,8 +28,6 @@ pub struct ZondConfig {
3028
/// processing incoming DNS packets if they were initiated elsewhere.
3129
pub no_dns: bool,
3230

33-
34-
3531
/// Enables privacy mode for sensitive data in the output.
3632
///
3733
/// When enabled, personally identifiable information (PII) or sensitive

common/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
pub mod config;
88
pub mod logging;
9-
pub mod net;
109
pub mod models;
10+
pub mod net;
1111
pub mod parse;
1212
pub mod sender;
1313
pub mod utils;

common/src/models.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
// If a copy of the MPL was not distributed with this file, You can obtain one at
55
// https://mozilla.org/MPL/2.0/.
66

7+
pub mod fingerprint;
78
pub mod host;
89
pub mod ip;
910
pub mod localhost;
1011
pub mod port;
1112
pub mod target;
12-
pub mod fingerprint;

common/src/models/ip/range.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,13 @@ mod tests {
328328

329329
#[test]
330330
fn from_str_invalid() {
331-
assert!(matches!("invalid".parse::<Ipv4Range>(), Err(IpError::AddrParse(_))));
332-
assert!(matches!("10.0.0.1/40".parse::<Ipv4Range>(), Err(IpError::InvalidPrefix(40))));
331+
assert!(matches!(
332+
"invalid".parse::<Ipv4Range>(),
333+
Err(IpError::AddrParse(_))
334+
));
335+
assert!(matches!(
336+
"10.0.0.1/40".parse::<Ipv4Range>(),
337+
Err(IpError::InvalidPrefix(40))
338+
));
333339
}
334340
}

common/src/net/interface.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ pub mod routing;
1818
pub mod utils;
1919

2020
pub use ext::NetworkInterfaceExtension;
21-
pub use lan::{get_lan_network, ViabilityError};
21+
pub use lan::{ViabilityError, get_lan_network};
2222
pub use routing::map_ips_to_interfaces;
2323
pub use utils::{get_prioritized_interfaces, is_layer_2_capable, is_on_link};

common/src/net/interface/os.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ pub use macos_impl::{is_physical, is_wireless};
2222
pub use windows_impl::{is_physical, is_wireless};
2323

2424
/// Determines if the interface corresponds to a physical adapter (not virtual).
25-
26-
2725
#[cfg(target_os = "linux")]
2826
pub mod linux_impl {
2927
use super::*;

common/src/parse/ip.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ use std::net::{IpAddr, Ipv4Addr};
2929
use std::sync::atomic::{AtomicBool, Ordering};
3030
use thiserror::Error;
3131

32-
use crate::net::interface;
3332
use crate::models::ip::range::{IpError, Ipv4Range};
3433
use crate::models::ip::set::IpSet;
34+
use crate::net::interface;
3535
use crate::{info, success, warn};
3636

3737
/// Global indicator set to `true` if a "lan" resolution was successfully performed.

0 commit comments

Comments
 (0)