8 unstable releases (3 breaking)

✓ Uses Rust 2018 edition

0.4.0 Aug 5, 2019
0.3.0 Jul 9, 2019
0.2.0 Aug 14, 2018
0.1.4 May 16, 2018
0.1.1 Mar 17, 2018

#1 in #kerberos

Download history 1249/week @ 2019-12-02 2025/week @ 2019-12-09 1003/week @ 2019-12-16 172/week @ 2019-12-23 227/week @ 2019-12-30 444/week @ 2020-01-06 962/week @ 2020-01-13 651/week @ 2020-01-20 772/week @ 2020-01-27 452/week @ 2020-02-03 1118/week @ 2020-02-10 1083/week @ 2020-02-17 1021/week @ 2020-02-24 1760/week @ 2020-03-02 1625/week @ 2020-03-09 2271/week @ 2020-03-16

6,700 downloads per month

MIT/Apache

53KB
852 lines

Kerberos parser

License: MIT Apache License 2.0 Build Status Crates.io Version

Kerberos Parser

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 KRB_AS_REQ message, use parse_as_req.

Examples

Parsing a KRB_AS_REQ message:

use kerberos_parser::krb5::MessageType;
use kerberos_parser::krb5_parser::parse_as_req;

static AS_REQ: &'static [u8] = include_bytes!("../assets/as-req.bin");

let res = parse_as_req(AS_REQ);
match res {
    Ok((rem, kdc_req)) => {
        assert!(rem.is_empty());
        //
        assert_eq!(kdc_req.msg_type, MessageType::KRB_AS_REQ);
    },
    _ => panic!("KRB_AS_REQ parsing failed: {:?}", res),
}

Rusticata

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.

License

Licensed under either of

at your option.

Contribution

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.

Dependencies

~1MB
~16K SLoC