use firehazard::*;
use std::fs::File;
fn main() {
let temp = std::env::var("TEMP").unwrap(); File::create(format!(r"{temp}\win32_security_playground_medium.txt")).unwrap();
let t = open_process_token(get_current_process(), token::ADJUST_DEFAULT).unwrap();
t.set_integrity_level(sid::AndAttributes::new(sid!(S-1-16-0), None)).unwrap();
dbg!(open_process_token(get_current_process(), token::QUERY).unwrap().integrity_level().unwrap().label().sid);
t.set_integrity_level(sid::AndAttributes::new(sid!(S-1-16-0x1000), None)).unwrap_err(); drop(t);
File::create(format!(r"{temp}\win32_security_playground_untrusted.txt")).unwrap_err();
File::open(format!(r"{temp}\win32_security_playground_medium.txt")).unwrap();
}