Skip to content

Commit 015c71a

Browse files
committed
removed trailing MIT option in the CLI and replaced integral types to correct alias
1 parent 9c6b032 commit 015c71a

File tree

3 files changed

+15
-18
lines changed

3 files changed

+15
-18
lines changed

docs/documentation.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,6 @@ This is the table of all the brands the lib supports.
659659
| | --dynamic | allow the conclusion message to be dynamic (8 possibilities instead of only 2) |
660660
| | --verbose | add more information to the output |
661661
| | --compact | ignore the unsupported techniques from the CLI output and thus make it more compact |
662-
| | --mit | ignore the GPL techniques and run only the MIT-supported ones |
663662
| | --enums | display the technique enum name used by the lib |
664663
> [!NOTE]
665664
> If you want a general result with the default settings, do not put any arguments. This is the intended way to use the CLI tool.

src/cli.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ std::string grey = "\x1B[38;2;108;108;108m";
6464
using u8 = std::uint8_t;
6565
using u16 = std::uint16_t;
6666
using u32 = std::uint32_t;
67+
using i32 = std::int32_t;
6768

6869
enum arg_enum : u8 {
6970
HELP,
@@ -83,7 +84,6 @@ enum arg_enum : u8 {
8384
DYNAMIC,
8485
VERBOSE,
8586
COMPACT,
86-
MIT,
8787
ENUMS,
8888
NULL_ARG
8989
};
@@ -164,7 +164,6 @@ R"(Usage:
164164
--dynamic allow the conclusion message to be dynamic (8 possibilities instead of only 2)
165165
--verbose add more information to the output
166166
--compact ignore the unsupported techniques from the CLI output
167-
--mit ignore the GPL techniques and run only the MIT-supported ones
168167
--enums display the technique enum name used by the lib
169168
)";
170169

@@ -1189,19 +1188,18 @@ int main(int argc, char* argv[]) {
11891188
{ "--dynamic", DYNAMIC },
11901189
{ "--verbose", VERBOSE },
11911190
{ "--compact", COMPACT },
1192-
{ "--mit", MIT },
11931191
{ "--enums", ENUMS },
11941192
{ "--no-ansi", NO_ANSI }
11951193
}};
11961194

11971195
std::string potential_null_arg = "";
11981196

1199-
for (int i = 1; i < argc; ++i) {
1197+
for (i32 i = 1; i < argc; ++i) {
12001198
const char* arg_string = argv[i];
12011199

1202-
auto it = std::find_if(table.cbegin(), table.cend(), [&](const std::pair<const char*, int>& p) {
1200+
auto it = std::find_if(table.cbegin(), table.cend(), [&](const std::pair<const char*, i32>& p) {
12031201
return (std::strcmp(p.first, arg_string) == 0);
1204-
});
1202+
});
12051203

12061204
if (it == table.end()) {
12071205
arg_bitset.set(NULL_ARG);

src/vmaware.hpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2175,17 +2175,17 @@ struct VM {
21752175
return false;
21762176
}
21772177

2178-
const uint32_t prefix = (uint32_t)mac[0]
2179-
| ((uint32_t)mac[1] << 8)
2180-
| ((uint32_t)mac[2] << 16);
2181-
2182-
constexpr uint32_t VBOX = 0x270008; // 08:00:27
2183-
constexpr uint32_t VMW1 = 0x29000C; // 00:0C:29
2184-
constexpr uint32_t VMW2 = 0x141C00; // 00:1C:14
2185-
constexpr uint32_t VMW3 = 0x565000; // 00:50:56
2186-
constexpr uint32_t VMW4 = 0x690500; // 00:05:69
2187-
constexpr uint32_t XEN = 0xE31600; // 00:16:E3
2188-
constexpr uint32_t PAR = 0x421C00; // 00:1C:42
2178+
const u32 prefix = (u32)mac[0]
2179+
| ((u32)mac[1] << 8)
2180+
| ((u32)mac[2] << 16);
2181+
2182+
constexpr u32 VBOX = 0x270008; // 08:00:27
2183+
constexpr u32 VMW1 = 0x29000C; // 00:0C:29
2184+
constexpr u32 VMW2 = 0x141C00; // 00:1C:14
2185+
constexpr u32 VMW3 = 0x565000; // 00:50:56
2186+
constexpr u32 VMW4 = 0x690500; // 00:05:69
2187+
constexpr u32 XEN = 0xE31600; // 00:16:E3
2188+
constexpr u32 PAR = 0x421C00; // 00:1C:42
21892189

21902190
if (prefix == VBOX) {
21912191
return core::add(brands::VBOX);

0 commit comments

Comments
 (0)