We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
例如像这样声明
[HookMethod("System.Net.HttpWebRequest")] public WebResponse GetResponse(){}
The text was updated successfully, but these errors were encountered:
#10
Sorry, something went wrong.
刚试了一下.net 4.7.2 HttpWebRequest.GetResponse方法显示是已经替换掉了,但不会走hook方法,不知道啥原因。
测试代码:
public class aaa : IMethodHook { [HookMethod("System.Net.HttpWebRequest")] public WebResponse GetResponse() { Console.WriteLine("Hook Url Load"); return GetResponse_Original(); } [OriginalMethod] public WebResponse GetResponse_Original() { return null; } } public static void main() { MethodHook.Install(); var req = WebRequest.CreateHttp("https://csdn.net"); Console.WriteLine("Call"); var rep = (HttpWebResponse)req.GetResponse(); rep.Close(); Console.WriteLine((int)rep.StatusCode); }
No branches or pull requests
例如像这样声明
[HookMethod("System.Net.HttpWebRequest")]
public WebResponse GetResponse(){}
The text was updated successfully, but these errors were encountered: