Skip to content

Latest commit

 

History

History
75 lines (51 loc) · 2.13 KB

README.md

File metadata and controls

75 lines (51 loc) · 2.13 KB

vmdetect

C++/python libraries and simple command line tool designed to detect when running under virtual machine.

Based on py_vmdetect sources from https://github.com/kepsic/py_vmdetect

Platform: Linux/Windows License: GPL v3 CodeQL build result PyPI version

Installation

Pre build packages

You can download installation package for supported linux distributions in Open Build Service

Download from open build service Download from githut Download from pypi

Examples:

Command line

vmdetect
echo $?
vmdetect -n
Bare Metal
vmdetect -i
0

Python

import virtualmachine
print(virtualmachine.name())
import virtualmachine
print(virtualmachine.id())

C++

#include <vmdetect/virtualmachine.h>
#include <iostream>

using namespace std;

int main(int argc, char **argv) {
	VirtualMachine vm;

	if(vm) {
		cout << "Running on '" << vm << "' virtual machine" << endl;
		return 1;
	}

	return 0;
}