antivm 1.0.0

Anti virtualmachine or sites for check you program
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::process;

use sysinfo::System;

use crate::config::MIN_RAM_BYTES;
use crate::protection::Protection;

impl Protection {
    pub(crate) fn check_ram(&self) {
        let mut sys = System::new();
        sys.refresh_memory();
        if sys.total_memory() < MIN_RAM_BYTES {
            process::exit(0);
        }
    }
}