-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add initial nmap-service-probes crate (#1059)
- Loading branch information
1 parent
b6f4fb9
commit 9bd548e
Showing
7 changed files
with
1,299 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.