Burp Suite User Forum

Create new post

BCheck Question

Mohamed | Last updated: Jan 11, 2024 12:41AM UTC

Hi, I am trying to write a bcheck that will simply repeat the request but only if the request contains a specific parameter, for example, if the request contains a parameter named "repeat" then I would need to repeat this request and compare the response code with original response code. I am trying to write the code as follows but I keep getting "unexpected token" error, given request then if "repeat" in {request.url.param} then ----> error here "Unexpected token request on line 8 position 19" send request called check: method: "GET" Could you kindly assist? I tried to look for example in the official github repo and documentation but couldn't find much. Thank you.

Michelle, PortSwigger Agent | Last updated: Jan 11, 2024 01:18PM UTC

Hi You might find this section of the documentation useful: https://portswigger.net/burp/documentation/scanner/bchecks/bcheck-definition-reference#reserved-variables This gives you the options for referring to specific request or response properties. So, for example, you can refer to the query part of the URL in the latest request using latest.request.url.query I hope this helps. Please let me know if you have any further questions.

Mohamed | Last updated: Jan 11, 2024 05:35PM UTC

Hi Michelle, Thanks for your response. As I have mentioned in my question, I did use request.url.param as mentioned in the documentation but it errored out. Could you kindly provide a working example of request.url.param? Thanks, Rehan

Mohamed | Last updated: Jan 11, 2024 05:57PM UTC

Hi Michelle, Please ignore my recent response, I looked closely in to your response and noticed that I have to use .query and not .param I don't know where I got the .param idea from :) Thanks for your time, the issue is resolved.

You must be an existing, logged-in customer to reply to a thread. Please email us for additional support.