A Kerberos v5 ([RFC4120]) parser, implemented with the nom parser combinator framework.
The code is available on Github.
Specific parsing functions are provided for Kerberos message types. For ex. to parse a
KRBASREQ message, use parse_as_req
.
Parsing a KRBASREQ message:
```rust,norun use kerberosparser::krb5::MessageType; use kerberosparser::krb5parser::parseasreq;
static ASREQ: &'static [u8] = includebytes!("../assets/as-req.bin");
let res = parseasreq(ASREQ); match res { Ok((rem, kdcreq)) => { assert!(rem.isempty()); // asserteq!(kdcreq.msgtype, MessageType::KRBASREQ); }, _ => panic!("KRBASREQ parsing failed: {:?}", res), } ```
This parser is part of the rusticata project. The goal of this project is to provide safe parsers, that can be used in other projects.
Testing of the parser is done manually, and also using unit tests and cargo-fuzz. Please fill a bugreport if you find any issue.
Feel free to contribute: tests, feedback, doc, suggestions (or code) of new parsers etc. are welcome.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.