Transfer a wireshark captured http request to a curl request

FisherMartyn picture FisherMartyn · Apr 11, 2016 · Viewed 7.7k times · Source

I am trying to simulate a post request from a system I am not familiar with(http thrift).

With wire shark, I get the http request like :enter image description here.

But I am going to perform a stress test with tools like ab, so How I can transfer a Wireshark package to a ab or curl command http request ?

Answer

Daniel Stenberg picture Daniel Stenberg · Oct 13, 2017

Here are two tools that can help you:

  1. h2c, HTTP headers to curl, which converts a HTTP request to a suitable curl command line. (written by me)
  2. pcap2curl, which is similar in style but instead converts a saved PCAP file with a HTTP request to a curl command line.