antivm 1.2.0

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

impl Protection {
    pub(crate) fn check_cpu(&self) {
        let cores = std::thread::available_parallelism()
            .map(|n| n.get())
            .unwrap_or(1);
        if cores <= 1 {
            self.on_fail();
        }
    }
}