The Burp Suite User Forum was discontinued on the 1st November 2024.

Burp Suite User Forum

For support requests, go to the Support Center. To discuss with other Burp users, head to our Discord page.

SUPPORT CENTER DISCORD

Import external modules (requests, urllib3,...) errors

Bajii0 | Last updated: Jul 10, 2023 01:19PM UTC

Hello, To execute my script I need to import requests module. I indicate to burp my site-package folder to load modules. Once i load my extension into burp, I have this error : SyntaxError: ("no viable alternative at input 'f'",the \'ssl\' module is compiled with {ssl.OPENSSL_VERSION!r} I'm pretty sure it comes from jython, because everyhting works fine when running under python. I wanted to know if anyone already had this issue ? Thanks in advance for your responses :)

Hannah, PortSwigger Agent | Last updated: Jul 13, 2023 08:57AM UTC

Hi It looks like urllib3 has removed support for Python2.7 (which is what Jython uses) as part of their v2.0 update: https://urllib3.readthedocs.io/en/latest/v2-migration-guide.html You may need to use an older version of this library. Alternatively, have you checked out the new Montoya API? Unfortunately, you're only able to use it with Java, but it contains a lot of additional functionality over the older Extender API. For more information on Montoya, please check out our documentation here: https://portswigger.net/burp/documentation/desktop/extensions/creating

Bajii0 | Last updated: Jul 13, 2023 01:50PM UTC

I checked Montoya API but doesn't change the fact that I need to use my already made own python script inside my java class and so Jython doesn't allow this... I'm currently trying other Java solution in order to do this but I'm still struggling. So if someone has an idea on how to execute python script using requests library, I'm really interested. If there is a valid solution including coding in Java and run the python script from there it's not a problem, it's even better because I would use Montoya API.

Hannah, PortSwigger Agent | Last updated: Jul 13, 2023 02:57PM UTC