feat: check login and self info

This commit is contained in:
hugy committed 2023-11-01 21:57:03 +08:00
1 parent 1ff56fc055
commit bede8f7150
8 files changed
+240 -5

No files matched your search

+2
View File
@@ -58,6 +58,8 @@ void CloseConsole();
void HideModule(HMODULE module);
bool IsDigit(const std::string &str);
std::string Bytes2Hex(const BYTE *bytes, const int length);
} // namespace utils
} // namespace base
#endif
+14
View File
@@ -167,5 +167,19 @@ bool IsDigit(const std::string &str) {
return true;
}
std::string Bytes2Hex(const BYTE *bytes, const int length) {
if (bytes == NULL) {
return "";
}
std::string buff;
const int len = length;
for (int j = 0; j < len; j++) {
int high = bytes[j] / 16, low = bytes[j] % 16;
buff += (high < 10) ? ('0' + high) : ('a' + high - 10);
buff += (low < 10) ? ('0' + low) : ('a' + low - 10);
}
return buff;
}
} // namespace utils
} // namespace base