mirror of
https://github.com/rehlds/reunion.git
synced 2025-05-12 04:49:24 +03:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
95d3e935d8 | ||
|
58e894ef25 |
@ -61,15 +61,10 @@ void SaltSteamId(authdata_t* authdata) {
|
||||
byte buf[MAX_HASHDATA_LEN];
|
||||
CSizeBuf szbuf(buf, sizeof buf);
|
||||
|
||||
// deprecated auth version reunion2015 has a truncated ticket buffer
|
||||
const uint32_t MAX_RAWAUTHDATA_TRUNC = 16;
|
||||
uint32_t authKeyMaxLen = (g_ReunionConfig->getAuthVersion() == av_reunion2015)
|
||||
? MAX_RAWAUTHDATA_TRUNC : authdata->authKeyLen;
|
||||
|
||||
if (g_ReunionConfig->getAuthVersion() < av_reunion2018)
|
||||
szbuf.WriteLong(authdata->steamId);
|
||||
if (g_ReunionConfig->getAuthVersion() > av_dproto)
|
||||
szbuf.Write(authdata->authKey, authKeyMaxLen);
|
||||
szbuf.Write(authdata->authKey, Reunion_AuthKeyMaxLen(authdata));
|
||||
|
||||
szbuf.Write(g_ReunionConfig->getSteamIdSalt(), g_ReunionConfig->getSteamIdSaltLen());
|
||||
|
||||
|
@ -37,17 +37,27 @@ int g_NumClientAuthorizers = 0;
|
||||
const char *g_RevEmuCryptKey = "_YOU_SERIOUSLY_NEED_TO_GET_LAID_";
|
||||
const uint32_t g_SteamEmuHashKey = 0xC9710266;
|
||||
|
||||
static uint32_t revHash(const char* str)
|
||||
static uint32_t revHash(const char* str, int n = -1)
|
||||
{
|
||||
uint32_t hash = 0x4E67C6A7;
|
||||
|
||||
for (int cc = *str; cc; cc = *++str) {
|
||||
for (int cc = *str; cc && n != 0; cc = *++str, --n) {
|
||||
hash ^= (hash >> 2) + cc + 32 * hash;
|
||||
}
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
// deprecated auth version reunion2015 has a truncated ticket buffer
|
||||
size_t Reunion_AuthKeyMaxLen(authdata_t* authdata)
|
||||
{
|
||||
const uint32_t MAX_RAWAUTHDATA_TRUNCATED = 16;
|
||||
uint32_t authKeyMaxLen = (g_ReunionConfig->getAuthVersion() == av_reunion2015)
|
||||
? min(authdata->authKeyLen, MAX_RAWAUTHDATA_TRUNCATED) : authdata->authKeyLen;
|
||||
|
||||
return authKeyMaxLen;
|
||||
}
|
||||
|
||||
void RevEmuFinishAuthorization(authdata_t* authdata, const char* authStr, size_t authKeyMaxLen, bool stripSpecialChars)
|
||||
{
|
||||
uint32_t volumeId;
|
||||
|
@ -85,3 +85,4 @@ class CNoSteam48Authorizer : public IClientAuthorizer {
|
||||
extern void Reunion_Init_Authorizers();
|
||||
extern client_auth_kind Reunion_Authorize_Client(authdata_t* authdata);
|
||||
extern const char* Reunion_GetAuthorizerName(client_auth_kind authKind);
|
||||
extern size_t Reunion_AuthKeyMaxLen(authdata_t* authdata);
|
||||
|
Loading…
x
Reference in New Issue
Block a user