Burp Suite User Forum

Create new post

Cannot access URL value when trying to build a Python extension

paupaulaz | Last updated: Apr 04, 2022 05:40PM UTC

Hi, I am trying to build my first Python extension to BurpSuite. As a starter, I am focusing on getting basic request data from the repeater tab. For some reason, I cannot seem to access the URL from the current request, whereas the headers and method can be accessed without any issue. I am trying to use both the url attribute and the getUrl() method on the result from analyzeRequest without success. My code is available here: https://gist.github.com/paupaulaz/f77ef9bef79647520b14f63685a34b67 Is there any reason why this is not working ? And would there be any place where I could find details about the Python API for Burp extensions ? Thanks a lot :)

Hannah, PortSwigger Agent | Last updated: Apr 05, 2022 08:04AM UTC

Hi You can find some example extensions to help get you started here: https://portswigger.net/burp/extender The custom logger extension retrieves the URL from the request/response to display it in its table - you could have a look at this to see how it makes this happen. There is no specific Python version of the Extender API - it's used in the same way across different languages. We're currently working on a new version of the Extender API that should be completely independent of the language used. You can check out our current roadmap here: https://portswigger.net/burp/pro/roadmap

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