Merge pull request #756 (#152)

* nya v1.2

Co-authored-by: haiwwkes <49613070+rhailrake@users.noreply.github.com>
This commit is contained in:
Jabak
2024-10-28 20:54:34 +03:00
committed by GitHub
parent 5a82110239
commit aedef12177
3 changed files with 13 additions and 1 deletions

View File

@@ -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;

View File

@@ -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));

View File

@@ -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;