Burp Suite User Forum

Login to post

Trouble integrating requests python library and jython

Manuel | Last updated: Oct 02, 2019 01:29PM UTC

Im currently building a burp extension using Jython. At one point I basically get URLs from the proxy Tab and make an additional request with that url+someEndpoint with the Python Requests library. The extension works fine if I use the URL that "comes" from proxy tab, something like this. requests.get(str(requestInfo.getUrl())) But when I, for example, want to get the "source" URL and then send the request with the library. Something like this. splitURL = str(str(requestInfo.getUrl())).split("/") newURLToSend = ((splitURL[0] + "/" + splitURL[1] + "/" + splitURL[2] + "/")) That does not work and I get weir errors like "Invalid distance too far back" and such. Both of the URLs are strings so I cant wrap my head around on why that is not working. Any idea on what could be going on? Thanks for the help!

Liam, PortSwigger Agent | Last updated: Oct 03, 2019 08:12AM UTC

Have you tried debugging each point in the Python code you have written?

You need to Log in to post a reply. Or register here, for free.