Skip to content

Commit

Permalink
feat: Add initial nmap-service-probes crate (#1059)
Browse files Browse the repository at this point in the history
  • Loading branch information
XAMPPRocky authored Jan 13, 2025
1 parent b6f4fb9 commit 9bd548e
Show file tree
Hide file tree
Showing 7 changed files with 1,299 additions and 1 deletion.
20 changes: 19 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ members = [
".",
"crates/agones",
"crates/macros",
"crates/nmap-service-probes",
"crates/proto-gen",
"crates/quilkin-proto",
"crates/test",
Expand Down
15 changes: 15 additions & 0 deletions crates/nmap-service-probes/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "nmap-service-probes"
version = "0.1.0"
license.workspace = true
edition.workspace = true

[dependencies]
thiserror.workspace = true
winnow = "0.6.22"

[lints]
workspace = true

[dev-dependencies]
pretty_assertions = "1.4.1"
25 changes: 25 additions & 0 deletions crates/nmap-service-probes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# nmap-service-probes
A `#[no_std]` parser and code generator for the [nmap-service-probes] file format.

```rust
let probes = nmap_service_probes::parse("Probe UDP Help q|help\r\n\r\n|")?;

assert_eq!(
&probes[0],
&ServiceProbe {
protocol: Protocol::Udp,
name: "Help".into(),
string: "help\r\n\r\n".into(),
no_payload: false,
total_wait_millis: None,
fallbacks: <_>::default(),
ports: vec![],
rarity: None,
ssl_ports: <_>::default(),
tcp_wrapped_millis: <_>::default(),
matches: vec![]
}
);
```

[nmap-service-probes]: https://nmap.org/book/vscan-fileformat.html
Loading

0 comments on commit 9bd548e

Please sign in to comment.