@@ -47,6 +47,7 @@ public sealed class NyaCheckClientSystem : EntitySystem
|
||||
HasPatchMetadata = FoundPatchMetadataTypes(),
|
||||
ReflectionOffender = FoundExtraTypesIReflection(out var reflectionOffender) ? reflectionOffender : null,
|
||||
HasMoonyware = FoundMoonywareModuleReflection(),
|
||||
HasHarmony = CheckForHarmony(),
|
||||
IoCOffender = TypesNotFromContentIoC(out var iocOffender) ? iocOffender : null,
|
||||
ExtraModuleOffender = CheckExtraModule(out var moduleOffender) ? moduleOffender : null,
|
||||
CvarOffender = CheckCommonCheatCvars(out var cvarOffender) ? cvarOffender : null,
|
||||
@@ -62,6 +63,12 @@ public sealed class NyaCheckClientSystem : EntitySystem
|
||||
return found is not null;
|
||||
}
|
||||
|
||||
private bool CheckForHarmony()
|
||||
{
|
||||
var harmonyType = Type.GetType("HarmonyLib.Harmony, 0Harmony");
|
||||
return harmonyType != null;
|
||||
}
|
||||
|
||||
private bool FoundExtraTypesIReflection([NotNullWhen(true)] out string? offender)
|
||||
{
|
||||
offender = null;
|
||||
@@ -171,7 +178,8 @@ public sealed class NyaCheckClientSystem : EntitySystem
|
||||
"esp",
|
||||
"noslip",
|
||||
"exploit",
|
||||
"fun"
|
||||
"fun",
|
||||
"scan",
|
||||
];
|
||||
|
||||
offend = null;
|
||||
|
||||
@@ -56,6 +56,9 @@ public sealed class CheatCheckSystem : EntitySystem
|
||||
if (ev.HasMoonyware)
|
||||
detections.Add(("Чит-клиент", "Обнаружен Moonyware", 95));
|
||||
|
||||
if (ev.HasHarmony)
|
||||
detections.Add(("Чит-клиент", "Имеется 0Harmony. Скорее всего читер. Следите с помощью nyagrab", 100));
|
||||
|
||||
if (ev.IoCOffender != null)
|
||||
detections.Add(("IoC манипуляция", $"Неразрешенный тип: {ev.IoCOffender}", 70));
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ public sealed class CheatCheckResponseEvent : EntityEventArgs
|
||||
public bool HasPatchMetadata;
|
||||
public string? ReflectionOffender;
|
||||
public bool HasMoonyware;
|
||||
public bool HasHarmony;
|
||||
public string? IoCOffender;
|
||||
public string? ExtraModuleOffender;
|
||||
public string? CvarOffender;
|
||||
|
||||
Reference in New Issue
Block a user