@@ -536,10 +536,6 @@ struct VM {
536536 DMESG,
537537 HWMON,
538538 LINUX_USER_HOST,
539- VMWARE_IOMEM,
540- VMWARE_IOPORTS,
541- VMWARE_SCSI,
542- VMWARE_DMESG,
543539 QEMU_VIRTUAL_DMI,
544540 QEMU_USB,
545541 HYPERVISOR_DIR,
@@ -6317,23 +6313,6 @@ struct VM {
63176313 }
63186314
63196315
6320- /**
6321- * @brief Check for VMware string in /proc/iomem
6322- * @category Linux
6323- * @author idea from ScoopyNG by Tobias Klein
6324- * @implements VM::VMWARE_IOMEM
6325- */
6326- [[nodiscard]] static bool vmware_iomem() {
6327- const std::string iomem_file = util::read_file("/proc/iomem");
6328-
6329- if (util::find(iomem_file, "VMware")) {
6330- return core::add(brand_enum::VMWARE);
6331- }
6332-
6333- return false;
6334- }
6335-
6336-
63376316 /**
63386317 * @brief Check for the presence of BlueStacks-specific folders
63396318 * @category ARM, Linux
@@ -6646,59 +6625,6 @@ struct VM {
66466625 }
66476626
66486627
6649- /**
6650- * @brief Check for VMware string in /proc/scsi/scsi
6651- * @category Linux
6652- * @author idea from ScoopyNG by Tobias Klein
6653- * @implements VM::VMWARE_SCSI
6654- */
6655- [[nodiscard]] static bool vmware_scsi() {
6656- const std::string scsi_file = util::read_file("/proc/scsi/scsi");
6657-
6658- if (util::find(scsi_file, "VMware")) {
6659- return core::add(brand_enum::VMWARE);
6660- }
6661-
6662- return false;
6663- }
6664-
6665-
6666- /**
6667- * @brief Check for VMware-specific device name in dmesg output
6668- * @category Linux
6669- * @author idea from ScoopyNG by Tobias Klein
6670- * @note Disabled by default
6671- * @warning Permissions required
6672- * @implements VM::VMWARE_DMESG
6673- */
6674- [[nodiscard]] static bool vmware_dmesg() {
6675- if (!util::is_admin()) {
6676- return false;
6677- }
6678-
6679- if (!util::exists("/usr/bin/dmesg")) {
6680- return false;
6681- }
6682-
6683- auto dmesg_output = util::sys_result("dmesg");
6684- const std::string& dmesg_o = *dmesg_output;
6685-
6686- if (dmesg_o.empty()) {
6687- return false;
6688- }
6689-
6690- if (util::find(dmesg_o, "BusLogic BT-958")) {
6691- return core::add(brand_enum::VMWARE);
6692- }
6693-
6694- if (util::find(dmesg_o, "pcnet32")) {
6695- return core::add(brand_enum::VMWARE);
6696- }
6697-
6698- return false;
6699- }
6700-
6701-
67026628 /**
67036629 * @brief Check for potential VM info in /proc/sysinfo
67046630 * @author idea from https://github.com/ShellCode33/VM-Detection/blob/master/vmdetect/linux.go
@@ -6849,23 +6775,6 @@ struct VM {
68496775 }
68506776
68516777
6852- /**
6853- * @brief Check for VMware string in /proc/ioports
6854- * @category Linux
6855- * @author idea from ScoopyNG by Tobias Klein
6856- * @implements VM::VMWARE_IOPORTS
6857- */
6858- [[nodiscard]] static bool vmware_ioports() {
6859- const std::string ioports_file = util::read_file("/proc/ioports");
6860-
6861- if (util::find(ioports_file, "VMware")) {
6862- return core::add(brand_enum::VMWARE);
6863- }
6864-
6865- return false;
6866- }
6867-
6868-
68696778 /**
68706779 * @brief Check for WSL or microsoft indications in /proc/ subdirectories
68716780 * @author idea from https://github.com/systemd/systemd/blob/main/src/basic/virt.c
@@ -13752,10 +13661,6 @@ struct VM {
1375213661 case MAC_SIP: return "MAC_SIP";
1375313662 case VPC_INVALID: return "VPC_INVALID";
1375413663 case SYSTEM_REGISTERS: return "SYSTEM_REGISTERS";
13755- case VMWARE_IOMEM: return "VMWARE_IOMEM";
13756- case VMWARE_IOPORTS: return "VMWARE_IOPORTS";
13757- case VMWARE_SCSI: return "VMWARE_SCSI";
13758- case VMWARE_DMESG: return "VMWARE_DMESG";
1375913664 case VMWARE_STR: return "VMWARE_STR";
1376013665 case MUTEX: return "MUTEX";
1376113666 case THREAD_MISMATCH: return "THREAD_MISMATCH";
@@ -14315,7 +14220,6 @@ VM::u8 VM::detected_count_num = 0;
1431514220
1431614221std::vector<VM::enum_flags> VM::disabled_techniques = []() {
1431714222 std::vector<VM::enum_flags> c;
14318- c.push_back(VM::VMWARE_DMESG);
1431914223 return c;
1432014224}();
1432114225
@@ -14391,10 +14295,6 @@ std::array<VM::core::technique, VM::enum_size + 1> VM::core::technique_table = [
1439114295 {VM::DMESG, {55, VM::dmesg}},
1439214296 {VM::HWMON, {35, VM::hwmon}},
1439314297 {VM::LINUX_USER_HOST, {10, VM::linux_user_host}},
14394- {VM::VMWARE_IOMEM, {65, VM::vmware_iomem}},
14395- {VM::VMWARE_IOPORTS, {70, VM::vmware_ioports}},
14396- {VM::VMWARE_SCSI, {40, VM::vmware_scsi}},
14397- {VM::VMWARE_DMESG, {65, VM::vmware_dmesg}},
1439814298 {VM::QEMU_VIRTUAL_DMI, {40, VM::qemu_virtual_dmi}},
1439914299 {VM::QEMU_USB, {20, VM::qemu_USB}},
1440014300 {VM::HYPERVISOR_DIR, {20, VM::hypervisor_dir}},
0 commit comments