Skip to content

Commit

Permalink
fix attempt 3 & updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kernelwernel committed Oct 5, 2023
1 parent b9e6a91 commit 44f4128
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
10 changes: 9 additions & 1 deletion src/vmaware.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
#include <Assert.h>
#include <excpt.h>
#include <winternl.h>
#include <winnetwk.h>
#include <versionhelpers.h>
#pragma comment(lib, "iphlpapi.lib")
#elif (LINUX)
Expand All @@ -105,6 +106,9 @@
#include <unistd.h>
#include <string.h>
#include <memory>
#elif (APPLE)
#include <sys/types.h>
#include <sys/sysctl.h>
#endif


Expand All @@ -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*;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 44f4128

Please sign in to comment.