Skip to content
New issue

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

method hooked success, but it just does NOT work #11

Open
e-snail opened this issue Jul 4, 2016 · 0 comments
Open

method hooked success, but it just does NOT work #11

e-snail opened this issue Jul 4, 2016 · 0 comments

Comments

@e-snail
Copy link

e-snail commented Jul 4, 2016

`
@hook("org.apache.http.client.HttpClient::[email protected]")

  public static void HttpClient_execute(HttpUriRequest request)  {

    Log.d("XXXX", "HttpClient_execute method is " + request.getMethod());

    HookManager.getDefault().callSuper(request);

  }
`

Log显示execute被hook成功;执行以下代码:

`
       String url = "https://www.baidu.com/img/bd_logo1.png";

       HttpClient client = new DefaultHttpClient(getParams());

       HttpGet get = new HttpGet(url);

       try {

        HttpResponse httpResponse = client.execute(get);

       } catch (IOException e) {

        e.printStackTrace();

       }
`

执行后网络请求返回状态码200,但是没调用到hook函数

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant