Skip to content

Commit 14402b8

Browse files
committed
remove: BSD license code
1 parent 1575a97 commit 14402b8

3 files changed

Lines changed: 0 additions & 108 deletions

File tree

docs/documentation.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -534,9 +534,6 @@ VMAware provides a convenient way to not only check for VMs, but also have the f
534534
| `VM::VPC_INVALID` | Check for official VPC method | 🪟 | 75% | | 32-bit | | [link](https://github.com/NotRequiem/VMAware/tree/main/src/vmaware.hpp#L9087) |
535535
| `VM::SYSTEM_REGISTERS` | | | 50% | | | | [link](https://github.com/NotRequiem/VMAware/tree/main/src/vmaware.hpp#L1) |
536536
| `VM::VMWARE_IOMEM` | Check for VMware string in /proc/iomem | 🐧 | 65% | | | | [link](https://github.com/NotRequiem/VMAware/tree/main/src/vmaware.hpp#L6328) |
537-
| `VM::VMWARE_IOPORTS` | Check for VMware string in /proc/ioports | 🐧 | 70% | | | | [link](https://github.com/NotRequiem/VMAware/tree/main/src/vmaware.hpp#L6860) |
538-
| `VM::VMWARE_SCSI` | Check for VMware string in /proc/scsi/scsi | 🐧 | 40% | | | | [link](https://github.com/NotRequiem/VMAware/tree/main/src/vmaware.hpp#L6657) |
539-
| `VM::VMWARE_DMESG` | Check for VMware-specific device name in dmesg output | 🐧 | 65% | Admin | | Disabled by default | [link](https://github.com/NotRequiem/VMAware/tree/main/src/vmaware.hpp#L6676) |
540537
| `VM::VMWARE_STR` | Check str assembly instruction method for VMware | 🪟 | 35% | | 32-bit | | [link](https://github.com/NotRequiem/VMAware/tree/main/src/vmaware.hpp#L9138) |
541538
| `VM::MUTEX` | Check for mutex strings of VM brands | 🪟 | 100% | | | | [link](https://github.com/NotRequiem/VMAware/tree/main/src/vmaware.hpp#L9224) |
542539
| `VM::THREAD_MISMATCH` | Check if the system's thread count matches the expected thread count for the detected CPU model | 🐧🪟🍏 | 50% | | | | [link](https://github.com/NotRequiem/VMAware/tree/main/src/vmaware.hpp#L5246) |

src/cli/output.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ static bool are_perms_required(const VM::enum_flags flag) {
8383
}
8484

8585
switch (flag) {
86-
case VM::VMWARE_DMESG:
8786
case VM::DMIDECODE:
8887
case VM::DMESG:
8988
case VM::QEMU_USB:
@@ -562,10 +561,6 @@ void general(bool high_threshold, bool all, bool dynamic, const char* output_fil
562561
checker(VM::HANDLES, "device handles");
563562
checker(VM::VPC_INVALID, "VPC invalid instructions");
564563
checker(VM::SYSTEM_REGISTERS, "task segment and descriptor tables");
565-
checker(VM::VMWARE_IOMEM, "/proc/iomem file");
566-
checker(VM::VMWARE_IOPORTS, "/proc/ioports file");
567-
checker(VM::VMWARE_SCSI, "/proc/scsi/scsi file");
568-
checker(VM::VMWARE_DMESG, "VMware dmesg");
569564
checker(VM::VMWARE_STR, "STR instruction");
570565
checker(VM::MUTEX, "mutex strings");
571566
checker(VM::THREAD_MISMATCH, "thread count mismatch");

src/vmaware.hpp

Lines changed: 0 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -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

1431614221
std::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

Comments
 (0)