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;