report_agent/
report-agent.rs

1use vmw_backdoor as vmw;
2
3#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
4fn main() {
5    let is_vmw = vmw::is_vmware_cpu();
6    eprintln!("VMware CPU detected: {}.", is_vmw);
7    if !is_vmw {
8        panic!("Hypervisor not present");
9    }
10
11    let mut backdoor = vmw::probe_backdoor_privileged().unwrap();
12    eprintln!("Got backdoor access.");
13
14    let mut erpc = backdoor.open_enhanced_chan().unwrap();
15    eprintln!("Got ERPC channel: {:?}.", erpc);
16
17    erpc.report_agent().unwrap();
18    eprintln!("Reported agent.");
19}
20
21#[cfg(not(all(target_os = "linux", target_arch = "x86_64")))]
22fn main() {
23    eprintln!("Unsupported target");
24}