From 44f412804d3da8272dd46f595c1cd5174940e649 Mon Sep 17 00:00:00 2001 From: Existential-Kernel Date: Thu, 5 Oct 2023 20:42:38 +0100 Subject: [PATCH] fix attempt 3 & updated docs --- docs/documentation.md | 4 ++++ src/vmaware.hpp | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/documentation.md b/docs/documentation.md index 681d645..5a07545 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -115,6 +115,10 @@ VMAware provides a convenient way to not only check for VMs, but also have the f | `VM::HWMODEL` | Check if the sysctl for the hwmodel does not contain the "Mac" string | MacOS | 75% | | `VM::DISK_SIZE` | Check if disk size is under or equal to 50GB | Linux | 60% | | `VM::VBOX_DEFAULT` | Check for default RAM and DISK sizes set by VirtualBox | Linux and Windows | 55% | +| `VM::VBOX_NETWORK` | Check VBox network provider string | Windows | 70% | +| `VM::COMPUTER_NAME` | Check for computer name string | Windows | 40% | +| `VM::MEMORY` | Check if memory space is far too low for a physical machine | Windows | 35% | + # Non-technique flags | Flag | Description | diff --git a/src/vmaware.hpp b/src/vmaware.hpp index caeec1f..cd67fb3 100644 --- a/src/vmaware.hpp +++ b/src/vmaware.hpp @@ -92,6 +92,7 @@ #include #include #include + #include #include #pragma comment(lib, "iphlpapi.lib") #elif (LINUX) @@ -105,6 +106,9 @@ #include #include #include +#elif (APPLE) + #include + #include #endif @@ -116,7 +120,6 @@ struct VM { using u64 = std::uint64_t; using i32 = std::int32_t; using i64 = std::int64_t; - using f64 = double; #if (CPP <= 14) using sv = const char*; @@ -2010,6 +2013,11 @@ struct VM { } catch (...) { return false; } */ + + /** + * @brief Check VBox network provider string + * + */ [[nodiscard]] static bool vbox_network_share() try { if (disabled(VBOX_NETWORK)) { return false;