how to modify packet header(IP header, TCP Header) before the host send them into the network

后端 未结 3 451
抹茶落季
抹茶落季 2020-12-10 09:29

I want to modify packet header(IP header, TCP Header) before the host send them into the network.

For example, if I\'m using firefox for browsing, then I want to int

3条回答
  •  北海茫月
    2020-12-10 09:54

    it should be for you Network packet capturing for Linux.

    But it seems to intercept all process in the system.


    maybe you can use

    #include 
    long ptrace (enum __ptrace_request request,
                 pid_t pid,
                 void *addr,
                 void *data);
    

    and hook send(2) or recv(2) to modify the tcp header.

提交回复
热议问题