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