antivm 1.2.0

Anti virtualmachine or sites for check you program
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::protection::Protection;

impl Protection {
    pub(crate) fn check_screen(&self) {
        #[cfg(windows)]
        {
            use winapi::um::winuser::{GetSystemMetrics, SM_CXSCREEN, SM_CYSCREEN};
            let w = unsafe { GetSystemMetrics(SM_CXSCREEN) };
            let h = unsafe { GetSystemMetrics(SM_CYSCREEN) };
            if w == 800 && h == 600 {
                self.on_fail();
            }
        }
    }
}