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パケットに分割される可能性が高いため、完全なリクエストを取得できない場合があります。