279{
281
283
284
286 {
289 }
290
293
294
297 {
299
300
302 {
304 {
305 check = &_payloadMgr.CachedChecks.at(id);
306 }
307 }
308
309 if (!check)
310 {
311 return true;
312 }
313
314 return false;
315 }
316 );
317
318
320 {
322 {
324 {
325
327 {
328 break;
329 }
330
331
333 {
335
336 LOG_DEBUG(
"warden",
"Adding custom warden payload '{}' to CurrentChecks.", payloadId);
337
340
341 continue;
342 }
343
344
347
348
350 {
352 }
353 else
354 {
356 }
357 }
358 }
359 }
360 else
361 {
362 bool hasLuaChecks = false;
364 {
366
367
369 {
371 }
372
374 {
375 hasLuaChecks = true;
376 }
377
379 }
380
381
382 if (!hasLuaChecks)
383 {
385 {
386
388 {
389 break;
390 }
391
392
395
396
398 }
399 }
400 }
401
402
403
407 [
this, &expectedSize](
uint16 id)
408 {
410
411
413 {
415 }
416
417
418 if (!check)
419 {
420 return true;
421 }
422
424 if ((expectedSize + thisSize) > 500)
425 {
427 return true;
428 }
429 expectedSize += thisSize;
430 return false;
431 }
432 );
433
436
438 {
440
441
443 {
445
447 buff.append(check->
Str.data(), check->
Str.size());
448
449 continue;
450 }
451
453 {
455 {
458 buff.append(check->
Str.data(), check->
Str.size());
460 buff.append(check->
IdStr.data(), check->
IdStr.size());
462 break;
463 }
466 {
468 buff.append(check->
Str.c_str(), check->
Str.size());
469 break;
470 }
471 }
472 }
473
475
476
479
481
483 {
485
486
488 {
490 }
491
494 {
496 {
500 break;
501 }
504 {
506 buff.append(data.data(), data.size());
509 break;
510 }
513 {
514 buff <<
uint8(index++);
515 break;
516 }
518 {
520 buff.append(data.data(), data.size());
521 buff <<
uint8(index++);
522 break;
523 }
525 {
526 std::array<uint8, 4> seed = Acore::Crypto::GetRandomBytes<4>();
527 buff.append(seed);
529 break;
530 }
531
532
533
534
535
536
537
538
539
540 }
541 }
542 buff <<
uint8(xorByte);
543 buff.hexlike();
544
545
547
549 pkt.append(buff);
551
553
554 std::stringstream stream;
555 stream << "Sent check id's: ";
557 {
558 stream << checkId << " ";
559 }
560
562}
constexpr uint8 MAX_WARDEN_CHECK_TYPES
Definition WardenCheckMgr.h:41
@ WARDEN_CHECK_LUA_TYPE
Definition WardenCheckMgr.h:37
static constexpr char _luaEvalPrefix[]
Definition WardenWin.cpp:38
static constexpr char _luaEvalMidfix[]
Definition WardenWin.cpp:39
static constexpr char _luaEvalPostfix[]
Definition WardenWin.cpp:40
static uint16 GetCheckPacketSize(WardenCheck const *check)
Definition WardenWin.cpp:59
static ServerConfigs GetMaxWardenChecksForType(uint8 type)
Definition WardenWin.cpp:92
@ TIMING_CHECK
Definition Warden.h:54
@ WARDEN_SMSG_CHEAT_CHECKS_REQUEST
Definition Warden.h:40
static Digest GetDigestOf(Container const &seed, uint8 const *data, std::size_t len)
Definition HMAC.h:40
std::vector< uint8 > ToByteVector(int32 minSize=0, bool littleEndian=true) const
Definition BigNumber.cpp:191
Definition ByteBuffer.h:70
std::list< uint16 > QueuedPayloads
The list of currently queued payload ids to be sent through Warden.
Definition WardenPayloadMgr.h:130
std::list< uint16 > _PendingChecks
Definition WardenWin.h:93
std::list< uint16 > _ChecksTodo[MAX_WARDEN_CHECK_TYPES]
Definition WardenWin.h:90
void EraseIf(Container &c, Predicate p)
Definition Containers.h:253
std::array< char, 4 > IdStr
Definition WardenCheckMgr.h:52
std::string Str
Definition WardenCheckMgr.h:49
BigNumber Data
Definition WardenCheckMgr.h:46
uint32 Address
Definition WardenCheckMgr.h:47