Force request matching by modifying dumpfile with inline script

I’m trying to overcome request matching failures during server response replay. The failures are caused by a timestamp in a request URL parameter.
My intended solution is to:

  1. Remove the timestamps from the flow.request.path for relevant requests in the saved mitmdump file that I’m using for playback, using an inline script
  2. Remove the timestamps on-the-fly from incoming requests, using an inline script

So, my questions are:

  • Does this seem like a good solution? Is there a better one that I’m overlooking?

  • Is there an example script similar to what I need for #1? I’ve looked through the examples and don’t see quite how to alter the flow.request.path for certain responses in a dump file, and save that altered dump file for later server-playback.


Hi @ntulele,

Generally speaking, that sounds like a reasonable solution. However, if the timestamp is just a regular request parameter, you can probably just use --replay-ignore-param?

mitdump -r existing-dumpfile -s transfoming-script -w new-dumpfile should do the job.


–replay-ignore-param worked, thank you for the speedy reply!

Sorry for overlooking/misunderstanding that option in the documentation.

1 Like