-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disabling detection flag types in VM::detect() is not functioning (detections run anyways) #276
Comments
I see the issue now, the problem is that you're adding
Would you prefer if I added a new function called |
Also I'm not entirely sure why you have |
Here is the document that showcases including default alongside disable: https://github.com/kernelwernel/VMAware/blob/main/docs/documentation.md#vmdetect It would seem intuitive that it works this way where it would AND the flags of the disable parameter, but it OR's them instead. |
That was the best way i could find on the current API to get a list of exactly which checks failed.
That would be perfect |
// this will loop through all the enums in the technique_vector variable,
// and then checks each of them and outputs the enum that was detected
for (const auto technique_enum : VM::technique_vector) {
if (VM::check(technique_enum)) {
const std::string name = VM::flag_to_string(technique_enum);
std::cout << "VM::" << name << " was detected\n";
}
} This could work fine, I'm 99% sure there shouldn't be any hickups in this code but you can use this if it's convenient :)
Sounds good, I'll let you know when it's complete. Shouldn't take more than a day. |
While trying to disable some faulty detections (different issue I will also make), I noticed that the users were still being flagged and that the detections were still running even though I have disabled them in the arguments to
VM::detect()
.Here is a minimal example to reproduce the issue:
Output on my Ryzen 7 7700X 8-Core machine:
As you can see, both
TIMER
andPOWER_CAPABILITIES
run and flag me regardless of me disabling them explicitly.Additionally core count seems to return threads and not physical cores it seems. But that's a separate issue.
Side note: it would be nice if the api exposed a flag emum static or getter which accumulates all flag types which have been detected so far. It would make diagnostics and detection reports significantly easier.
The text was updated successfully, but these errors were encountered: