Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Cannot import burp Extentions from python file

Brian R. 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/......./", line 4, in <module>
from burp import IBurpExtender
File "/opt/......../", line 4, in <module>
from burp import IBurpExtender
ImportError: cannot import name IBurpExtender

Adam Piper May 04, 2017 01:27PM UTC Support Center agent

Hi Brian,

Could you confirm that you’re loading your .py file into Burp from the “Extensions” tab via the “Add” button?

Brian Ridings May 04, 2017 07:07PM UTC
Correct I am loading it from the Add button

Adam Piper May 05, 2017 12:52AM UTC Support Center agent

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):

Could you check that you can load this, with the versions mentioned above?

Brian Ridings May 05, 2017 04:06PM UTC
Using v1.7.22 with jython-standalone-2.7.0.jar on Windows 8. Still the same error.

Brian Ridings 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.

Dafydd Stuttard May 08, 2017 10:10AM UTC Support Center agent

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

Brian Ridings May 17, 2017 02:57PM UTC
I figured it out. I had a file called in the folder I was running from which wasnt a problem before 1.7.18.

Dafydd Stuttard May 18, 2017 07:39AM UTC Support Center agent

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.

Post Your public answer

Your name
Your email address