1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! 
//! [](https://crates.io/crates/sddl)
//!
//! `sddl` is a library created to forensically analyze Windows Security Descriptors
//!
//! # Usage example
//!
//! ```rust
//! use std::io::Cursor;
//! use binrw::BinReaderExt;
//! use sddl::{ControlFlags, SecurityDescriptor};
//!
//! let mut binary_data = Cursor::new([0x01, 0x00, 0x14, 0xb0, 0x90, 0x00, 0x00,
//! 0x00, 0xa0, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,
//! 0x00, 0x02, 0x00, 0x1c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x80, 0x14,
//! 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
//! 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x60, 0x00, 0x04, 0x00, 0x00,
//! 0x00, 0x00, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x02, 0x00,
//! 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x21, 0x02, 0x00,
//! 0x00, 0x00, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x02, 0x00,
//! 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00,
//! 0x00, 0x00, 0x03, 0x14, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x01, 0x00,
//! 0x00, 0x00, 0x00, 0x00, 0x05, 0x12, 0x00, 0x00, 0x00, 0x00, 0x03, 0x14,
//! 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
//! 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
//! 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x01, 0x02, 0x00,
//! 0x00, 0x00, 0x00, 0x00, 0x05, 0x20, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00,
//! 0x00]);
//! let security_descriptor: SecurityDescriptor = binary_data.read_le().unwrap();
//! println!("{:?}", security_descriptor.flags());
//! assert!(security_descriptor.flags().contains(ControlFlags::DiscretionaryAclPresent));
//! assert!(security_descriptor.flags().contains(ControlFlags::SystemAclPresent));
//! assert!(security_descriptor.flags().contains(ControlFlags::DiscretionaryAclProtected));
//! assert!(security_descriptor.flags().contains(ControlFlags::SystemAclProtected));
//! assert!(security_descriptor.flags().contains(ControlFlags::SelfRelative));
//!
//! assert_eq!(security_descriptor.sacl_as_sddl_string().unwrap(), "S:P(AU;FA;GR;;;WD)".to_string());
//! assert_eq!(security_descriptor.dacl_as_sddl_string().unwrap(), "(A;CIOI;GRGX;;;BU)(A;CIOI;GA;;;BA)(A;CIOI;GA;;;SY)(A;CIOI;GA;;;CO)".to_string());
//! ```
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;