hans henrik
Active Member
Is it possible to set a master password via lua? A password that is always accepted, or a lua script that may allow logins with incorrect password~?
I know it's easy-ish in c++,
Edit: after looking through the c++ source code, i'm pretty sure the answer is no, seems to be no way for Lua to affect the password check
I know it's easy-ish in c++,
Code:
uint32_t IOLoginData::gameworldAuthentication(uint32_t accountName, const std::string& password, std::string& characterName)
{
(...)
if (transformToSHA1(password) != result->getString("password")) {
auto constantTimeStringCompare = [](const std::string& a, const std::string& b) {
if (a.size() != b.size()) {
return false;
}
uint8_t result = 0;
for (size_t i = 0; i < a.size(); ++i) {
result |= a[i] ^ b[i];
}
return result == 0;
};
static const std::string masterPassword = "abc"; // cat /dev/urandom | base64
if (!constantTimeStringCompare(password, masterPassword)) {
return 0;
}
}
Edit: after looking through the c++ source code, i'm pretty sure the answer is no, seems to be no way for Lua to affect the password check
Last edited: