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

Cannot import burp Extentions from python file

Brian | Last updated: May 02, 2017 08:55PM UTC

I'am trying to import IBurpExtender into my extention but I cant seem to import any of the API. I keep getting an import error. I cant figure out what is wrong. Traceback (most recent call last): File "/opt/......./burp.py", line 4, in <module> from burp import IBurpExtender File "/opt/......../burp.py", line 4, in <module> from burp import IBurpExtender ImportError: cannot import name IBurpExtender

Adam, PortSwigger Agent | Last updated: May 04, 2017 01:15PM UTC

Hi Brian, Could you confirm that you're loading your .py file into Burp from the "Extensions" tab via the "Add" button?

Adam, PortSwigger Agent | Last updated: May 04, 2017 02:53PM UTC

Using Burp 1.7.22 with Jython 2.7.0 I can load in the following file via the "Add" button as a Python extension: from burp import IBurpExtender class BurpExtender(IBurpExtender): def registerExtenderCallbacks(self, callbacks): callbacks.setExtensionName("test") Could you check that you can load this, with the versions mentioned above?

Burp User | Last updated: May 04, 2017 07:07PM UTC

Correct I am loading it from the Add button

PortSwigger Agent | Last updated: May 05, 2017 07:57AM UTC

Thanks for the feedback. We'll do some further investigation of this issue and get back to you.

Burp User | Last updated: May 05, 2017 04:06PM UTC

Using v1.7.22 with jython-standalone-2.7.0.jar on Windows 8. Still the same error.

Burp User | Last updated: May 05, 2017 04:53PM UTC

I am able to load my extentions with add with every burp before v1.7.18. I am not able to load since v1.7.18. I just downloaded and tested them.

PortSwigger Agent | Last updated: May 10, 2017 02:00PM UTC

Glad you got things working. We did make a change recently to add the folder containing the extension script to the Jython path. This makes it easier to make use of libraries etc by placing them into the same folder as the extension script. But it has the effect that errors / bad imports in stray scripts left in the same folder might prevent an extension from loading.

Burp User | Last updated: May 17, 2017 02:57PM UTC