Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 C 中的 pcap 库。我可以在 pcap_compile 调用中使用过滤器表达式“端口 80”过滤 http 流量,但现在我想知道是否可以专门过滤 POST 请求。
有谁知道用于过滤 http POST 请求的过滤器表达式?
以下内容应仅匹配 POST:
port 80 and tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504f5354
但是,一个 HTTP 请求很可能被拆分为各种 TCP 数据包,因此您可能无法获得完整的请求。