- 使用NETReactorSlayer反编译出来了程序源码,分析出来程序判断Vip是通过HttpWebRequest从网络获取的信息,使用Reqable拦截修改请求,设置Vip信息成功。
[C#] 纯文本查看 复制代码 private const string DefaultServerIp = "x.x.x.x";
private const string AlternateServerIp = "x.x.x.x";
private const string UserAgent = "Mozilla/5.2 (KHTML-XVA)";
private const int TimeoutMilliseconds = 5000;
private string _authToken;
public async Task<string> FetchDataAsync(string endpoint, string id = "")
{
string serverIp = DefaultServerIp;
string result = string.Empty;
try
{
string url = $"http://{serverIp}:6096/api/{endpoint}{(string.IsNullOrEmpty(id) ? "" : $"/{id}")}";
using (var request = (HttpWebRequest)WebRequest.Create(url))
{
request.UserAgent = UserAgent;
request.Headers.Add("CL", Convert.ToBase64String(Encoding.UTF8.GetBytes(_authToken)));
request.Timeout = TimeoutMilliseconds;
using (var response = await request.GetResponseAsync() as HttpWebResponse)
using (var stream = response.GetResponseStream())
using (var reader = new StreamReader(stream, Encoding.UTF8))
{
result = await reader.ReadToEndAsync();
}
}
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
serverIp = serverIp == DefaultServerIp ? AlternateServerIp : DefaultServerIp;
result = "X";
}
return result;
}
现在问题是用Reqable不够优雅,会影响到游戏加速器的使用,因为是反编译出来的程序,研究了DotNetDetour,函数名称是会变动的,也不能修改il指令,再加上程序经常更新,所以想用网络拦截的方法,有什么实现思路吗?网络拦截最好只影响目标程序 |