void WardenMac::Init(WorldSession* pClient, BigNumber* K) { Client = pClient; // Generate Warden Key SHA1Randx WK(K->AsByteArray(), K->GetNumBytes()); WK.generate(InputKey, 16); WK.generate(OutputKey, 16); uint8 mod_seed[16] = { 0x4D, 0x80, 0x8D, 0x2C, 0x77, 0xD9, 0x05, 0xC4, 0x1A, 0x63, 0x80, 0xEC, 0x08, 0x58, 0x6A, 0xFE }; memcpy(Seed, mod_seed, 16); iCrypto.Init(InputKey); oCrypto.Init(OutputKey); sLog->outStaticDebug("Server side warden for client %u initializing...", pClient->GetAccountId()); //PrintHexArray(" C->S Key: ", InputKey, 16, true); //PrintHexArray(" S->C Key: ", OutputKey, 16, true); //PrintHexArray(" Seed: ", Seed, 16, true); sLog->outStaticDebug("Loading Module..."); Module = GetModuleForClient(); PrintHexArray(" Module Key: ", Module->Key, 16, true); PrintHexArray(" Module ID: ", Module->ID, 16, true); RequestModule(); }
void WardenMac::Init(WorldSession *pClient, BigNumber *K) { Client = pClient; // Generate Warden Key SHA1Randx WK(K->AsByteArray(), K->GetNumBytes()); WK.generate(InputKey, 16); WK.generate(OutputKey, 16); /* Seed: 4D808D2C77D905C41A6380EC08586AFE (0x05 packet) Hash: <?> (0x04 packet) Module MD5: 0DBBF209A27B1E279A9FEC5C168A15F7 New Client Key: <?> New Cerver Key: <?> */ uint8 mod_seed[16] = { 0x4D, 0x80, 0x8D, 0x2C, 0x77, 0xD9, 0x05, 0xC4, 0x1A, 0x63, 0x80, 0xEC, 0x08, 0x58, 0x6A, 0xFE }; memcpy(Seed, mod_seed, 16); iCrypto.Init(InputKey); oCrypto.Init(OutputKey); sLog->outStaticDebug("Server side warden for client %u initializing...", pClient->GetAccountId()); // PrintHexArray(" C->S Key: ", InputKey, 16, true); // PrintHexArray(" S->C Key: ", OutputKey, 16, true); // PrintHexArray(" Seed: ", Seed, 16, true); sLog->outStaticDebug("Loading Module..."); Module = GetModuleForClient(Client); PrintHexArray(" Module Key: ", Module->Key, 16, true); PrintHexArray(" Module ID: ", Module->ID, 16, true); RequestModule(); }
void WardenWin::Init(WorldSession *pClient, BigNumber *K) { Client = pClient; // Generate Warden Key SHA1Randx WK(K->AsByteArray(), K->GetNumBytes()); WK.generate(InputKey, 16); WK.generate(OutputKey, 16); /* Seed: 4D808D2C77D905C41A6380EC08586AFE (0x05 packet) Hash: 568C054C781A972A6037A2290C22B52571A06F4E (0x04 packet) Module MD5: 79C0768D657977D697E10BAD956CCED1 New Client Key: 7F 96 EE FD A5 B6 3D 20 A4 DF 8E 00 CB F4 83 04 New Cerver Key: C2 B7 AD ED FC CC A9 C2 BF B3 F8 56 02 BA 80 9B */ uint8 mod_seed[16] = { 0x4D, 0x80, 0x8D, 0x2C, 0x77, 0xD9, 0x05, 0xC4, 0x1A, 0x63, 0x80, 0xEC, 0x08, 0x58, 0x6A, 0xFE }; memcpy(Seed, mod_seed, 16); iCrypto.Init(InputKey); oCrypto.Init(OutputKey); DEBUG_LOG("WARDEN: Server side warden for client %u initializing...", pClient->GetAccountId()); PrintHexArray(" C->S Key: ", InputKey, 16, true); PrintHexArray(" S->C Key: ", OutputKey, 16, true); PrintHexArray(" Seed: ", Seed, 16, true); DEBUG_LOG("WARDEN: Loading Module..."); Module = GetModuleForClient(Client); PrintHexArray(" Module Key: ", Module->Key, 16, true); PrintHexArray(" Module ID: ", Module->ID, 16, true); RequestModule(); }
void Fuzzer::AlarmCallback() { assert(Options.UnitTimeoutSec > 0); if (!CurrentUnitSize) return; // We have not started running units yet. size_t Seconds = duration_cast<seconds>(system_clock::now() - UnitStartTime).count(); if (Seconds == 0) return; if (Options.Verbosity >= 2) Printf("AlarmCallback %zd\n", Seconds); if (Seconds >= (size_t)Options.UnitTimeoutSec) { Printf("ALARM: working on the last Unit for %zd seconds\n", Seconds); Printf(" and the timeout value is %d (use -timeout=N to change)\n", Options.UnitTimeoutSec); if (CurrentUnitSize <= kMaxUnitSizeToPrint) { PrintHexArray(CurrentUnitData, CurrentUnitSize, "\n"); PrintASCII(CurrentUnitData, CurrentUnitSize, "\n"); } WriteUnitToFileWithPrefix( {CurrentUnitData, CurrentUnitData + CurrentUnitSize}, "timeout-"); Printf("==%d== ERROR: libFuzzer: timeout after %d seconds\n", GetPid(), Seconds); if (__sanitizer_print_stack_trace) __sanitizer_print_stack_trace(); Printf("SUMMARY: libFuzzer: timeout\n"); if (Options.AbortOnTimeout) abort(); exit(Options.TimeoutExitCode); } }
void Fuzzer::DumpCurrentUnit(const char *Prefix) { if (CurrentUnitSize <= kMaxUnitSizeToPrint) { PrintHexArray(CurrentUnitData, CurrentUnitSize, "\n"); PrintASCII(CurrentUnitData, CurrentUnitSize, "\n"); } WriteUnitToFileWithPrefix( {CurrentUnitData, CurrentUnitData + CurrentUnitSize}, Prefix); }
void Fuzzer::DeathCallback() { if (!CurrentUnitSize) return; Printf("DEATH:\n"); if (CurrentUnitSize <= kMaxUnitSizeToPrint) { PrintHexArray(CurrentUnitData, CurrentUnitSize, "\n"); PrintASCII(CurrentUnitData, CurrentUnitSize, "\n"); } WriteUnitToFileWithPrefix( {CurrentUnitData, CurrentUnitData + CurrentUnitSize}, "crash-"); }