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

Extension Not Loading Due to "Stale" Reference

Michael Sep 28, 2017 02:42AM UTC

So I noticed the following behavior when using the Python Scripter extension:

1. Installed the extension
2. Added custom script containing error in Scripter tab
3. Closed Burp
4. Relaunched Burp and noticed the extension would no longer load as it was still referencing the script from 2.
5. Removed/reinstalled the extension, but it still referenced the script from 2

Because the extension didn't load the Scripter tab was not visible and so the error could not be addressed.

See related output below:

Traceback (most recent call last):
File "/Users/michael/.BurpSuite/bapps/eb563ada801346e6bdb7a7d7c5c52583/burpscript.py", line 36, in registerExtenderCallbacks
self._code = compile(script, '<string>', 'exec')
File "<string>", line 13
for func in funcs
^
SyntaxError: mismatched input '\n' expecting COLON

at org.python.core.ParserFacade.fixParseError(ParserFacade.java:95)
at org.python.core.ParserFacade.parse(ParserFacade.java:205)
at org.python.core.CompileFunction.compile(__builtin__.java:1672)
at org.python.core.CompileFunction.compile(__builtin__.java:1648)
at org.python.core.CompileFunction.__call__(__builtin__.java:1636)
at org.python.core.PyObject.__call__(PyObject.java:496)
at org.python.core.PyObject.__call__(PyObject.java:500)
at org.python.pycode._pyx4.registerExtenderCallbacks$2(/Users/dark_knight/.BurpSuite/bapps/eb563ada801346e6bdb7a7d7c5c52583/burpscript.py:43)
at org.python.pycode._pyx4.call_function(/Users/dark_knight/.BurpSuite/bapps/eb563ada801346e6bdb7a7d7c5c52583/burpscript.py)
at org.python.core.PyTableCode.call(PyTableCode.java:167)
at org.python.core.PyBaseCode.call(PyBaseCode.java:307)
at org.python.core.PyBaseCode.call(PyBaseCode.java:198)
at org.python.core.PyFunction.__call__(PyFunction.java:482)
at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237)
at org.python.core.PyMethod.__call__(PyMethod.java:228)
at org.python.core.PyMethod.__call__(PyMethod.java:218)
at org.python.core.PyMethod.__call__(PyMethod.java:213)
at org.python.core.PyObject._jcallexc(PyObject.java:3626)
at org.python.core.PyObject._jcall(PyObject.java:3658)
at org.python.proxies.__main__$BurpExtender$0.registerExtenderCallbacks(Unknown Source)
at burp.lgc.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)

How do I clean this reference?


Paul Johnston Sep 28, 2017 08:28AM UTC Support Center agent

Hi Michael,

Thanks for your message. This appears to be a bug in Python Scripter; I will contact the extension author in due course.

You can use Jython to clear the reference for now:

$ java -jar jython-standalone-2.7.0.jar
>>> from java.util.prefs import Preferences
>>> Preferences.userRoot().node(‘burp/extensions/_Python Scripter’).removeNode()

Please let us know if you need any further assistance.


Paul Johnston Sep 28, 2017 12:56PM UTC Support Center agent

Hi Michael,

We have applied a fix to Python Scripter so it now starts properly even if the saved script won’t compile.

Hope this works for you!


Michael Sep 28, 2017 03:30PM UTC
Much appreciated.
Regards,
Michael

Post Your public answer

Your name
Your email address
Answer