Skip to content

Commit

Permalink
added boot and vm file checks, fixed checker bugs, and updated aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
kernelwernel committed Sep 17, 2023
1 parent a3cfcf4 commit 364995d
Show file tree
Hide file tree
Showing 6 changed files with 176 additions and 140 deletions.
66 changes: 0 additions & 66 deletions .github/workflows/msvc.yml

This file was deleted.

6 changes: 3 additions & 3 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
- finish the linux one FIRST
- revise sidt check
- convert makefile to cmake
- maybe add github templates and other ci/cd stuff
- analyse the UUID check technique's efficiency

- ~~make a flagcheck function~~
- ~~create a standard cpuid function (replace __cpuidex bc wine)~~
- ~~fix the pointer destruction error~~
- ~~convert makefile to cmake~~
- ~~fix the inconsistent naming~~
- ~~maybe add github templates and other ci/cd stuff~~


# distant plans
Expand Down
5 changes: 3 additions & 2 deletions docs/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ VMAware provides a convenient way to not only check for VMs, but also have the f
| Check temperature | Check for the presence of CPU temperature sensors (mostly not present in VMs) | `VM::TEMPERATURE` | Linux |
| Check chassis vendor | Check if the chassis has any VM-related keywords | `VM::CVENDOR` | Linux |
| Check chassis type | Check if the chassis type is valid (usually not in VMs) | `VM::CTYPE` | Linux |
| Check docker | Check if any docker-related files are present such as /.dockerenv and /.dockerinit | `VM::DOCKER` | Linux |
| Check docker | Check if any docker-related files are present such as /.dockerenv and /.dockerinit | `VM::DOCKER_CHECK` | Linux |
| Check dmidecode | Get output from dmidecode tool and grep for common VM keywords | `VM::DMIDECODE` | Linux |
| Check dmesg | Get output from dmesg tool and grep for common VM keywords | `VM::DMESG` | Linux |
| Check HWMON | Check if HWMON is present (if not, likely a VM) | `VM::HWMON` | Linux |
Expand All @@ -108,8 +108,9 @@ VMAware provides a convenient way to not only check for VMs, but also have the f
| Check DLLs | Match for VM-specific DLLs | `VM::DLL` | Windows |
| Check registry | Look throughout the registry for all sorts of VMs | `VM::REGISTRY` | Windows |
| Check Sunbelt | Detect for Sunbelt technology | `VM::SUNBELT` | Windows |
| Check Wine | Find for a Wine-specific file | `VM::WINE` | Windows |
| Check Wine | Find for a Wine-specific file | `VM::WINE_CHECK` | Windows |
| Check boot time | Analyse the OS uptime | `VM::BOOT` | Yes |
| Check VM files | Find if any VM-specific files exists | `VM::VM_FILES` | Windows |

# Non-technique flags
| Flag | Description |
Expand Down
5 changes: 4 additions & 1 deletion src/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int main(int argc, char* argv[]) {
checker(VM::SYSTEMD, "systemd virtualisation");
checker(VM::CVENDOR, "chassis vendor");
checker(VM::CTYPE, "chassis type");
checker(VM::DOCKER, "Dockerenv");
checker(VM::DOCKER_CHECK, "Dockerenv");
checker(VM::DMIDECODE, "dmidecode output");
checker(VM::DMESG, "dmesg output");
checker(VM::HWMON, "hwmon presence");
Expand All @@ -69,6 +69,9 @@ int main(int argc, char* argv[]) {
checker(VM::DLL, "DLLs");
checker(VM::REGISTRY, "registry");
checker(VM::SUNBELT, "Sunbelt");
checker(VM::WINE_CHECK, "Wine");
checker(VM::BOOT, "boot uptime");
checker(VM::VM_FILES, "VM files");
std::printf("\n");

std::cout << "VM brand: " << (std::string(VM::brand()) == "Unknown" ? red : green) << VM::brand() << ansi_exit << "\n\n";
Expand Down
Loading

0 comments on commit 364995d

Please sign in to comment.