[C#] 纯文本查看 复制代码
try
{
while (!this.IsDisposed)
{
var traget = Process.GetProcesses().FirstOrDefault(x => x.ProcessName == "TheyAreBillions");
if (traget != null && ExLink.Is64bit(traget, out bool isX64))
{
if (isX64 == SelfIsX64)
{
string TypeName = "TABHelper.Program";
string Method = "SneakOn";
string args = null;
Injector.InjectManaged((uint)traget.Id, Application.ExecutablePath, TypeName, Method, args);
break;
}
else
{
this.Invoke(new EventHandler(delegate { try { this.label1.Text = SelfIsX64 ? "请运行x86版本" : "请运行x64版本"; } catch { } }));
break;
}
}
Thread.Sleep(1000);
}
this.Invoke(new EventHandler(delegate { try { this.Close(); } catch { } }));
}
catch { }
[AppleScript] 纯文本查看 复制代码
public object LevelState => GameState == null ? null : GameState.GetProperty("LevelState");
public object GameState => GetGameState == null ? null : GetGameState.Invoke(null, null);
MethodInfo getGameState = null;
MethodInfo GetGameState => getGameState != null ? getGameState :
(getGameState = GetMethod("ZXGameState", null, "ZXGameState"));
public MethodInfo GetMethod(string ClassName, string MethodName, string ReturnType,int args = -1)
{
foreach (var x in AppDomain.CurrentDomain.GetAssemblies())
foreach (var a in x.GetTypes())
if (a.Name == ClassName)
foreach (var b in a.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static))
if ((MethodName == null || b.Name == MethodName) && (ReturnType == null | b.ReturnType.Name == ReturnType) && (args == -1 || b.GetParameters().Length == args))
return b;
return null;
}