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

Jython 2.7.2 Error via Burp suite extensions

kayteas | Last updated: Mar 09, 2022 04:51PM UTC

Hi, OS : Windows 10 Pro Burp suite version : 2022.2.2 (I have tested other versions before, but same problem exists.) Java version : 17.0.2 (but I have also tested other java versions JRE 14 , JRE 15 , JRE 16) Jython version : 2.7.2 issue is present on jython 2.7.2 and 2.7.1. (Jython 2.7.0 it works without any problem. but I want to install latest version and I am getting this error.) i'm getting an error trying to install any extension. I am using Jython 2.7.2 and I get following error (all jython burp suite extensions JS link finder , Autorize, Active scan ++ and other extensions ) ; java.lang.ExceptionInInitializerError at org.python.util.PythonInterpreter.<init>(PythonInterpreter.java:99) at org.python.util.PythonInterpreter.<init>(PythonInterpreter.java:93) at org.python.util.PythonInterpreter.<init>(PythonInterpreter.java:70) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480) at burp.gz3.<init>(Unknown Source) at burp.ps.a(Unknown Source) at burp.yf.lambda$panelLoaded$0(Unknown Source) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.lang.IllegalArgumentException: Cannot create PyString with non-byte value at org.python.core.PyString.<init>(PyString.java:57) at org.python.core.PyString.<init>(PyString.java:70) at org.python.core.PyString.<init>(PyString.java:74) at org.python.core.Py.newString(Py.java:643) at org.python.core.PyJavaType.init(PyJavaType.java:543) at org.python.core.PyType$Registry.createType(PyType.java:477) at org.python.core.PyType$Registry.addFromClass(PyType.java:426) at org.python.core.PyType$Registry.resolveType(PyType.java:352) at org.python.core.PyType$Registry$1.computeValue(PyType.java:208) at org.python.core.PyType$Registry$1.computeValue(PyType.java:202) at java.base/java.lang.ClassValue.getFromHashMap(ClassValue.java:228) at java.base/java.lang.ClassValue.getFromBackup(ClassValue.java:210) at java.base/java.lang.ClassValue.get(ClassValue.java:116) at org.python.core.PyType.fromClass(PyType.java:2137) at org.python.core.PyObject.<init>(PyObject.java:85) at org.python.core.PySingleton.<init>(PySingleton.java:9) at org.python.core.PyNotImplemented.<init>(PyNotImplemented.java:10) at org.python.core.Py.<clinit>(Py.java:66) ... 16 more Best Regards.

kayteas | Last updated: Mar 09, 2022 04:59PM UTC

I want you to solve the problem publicly on this ticket. because users with the same problem should see this solution. Do not ask me to send you an email. Thanks.

Ben, PortSwigger Agent | Last updated: Mar 10, 2022 08:20AM UTC

Hi, Are you using the standalone Jython jar file available from the page below: https://www.jython.org/download.html Are you also able to provide us with a screenshot of your Extender -> Options tab within Burp so that we can see what you have setup within here?

kayteas | Last updated: Mar 10, 2022 09:48AM UTC

Hi Ben, https://ibb.co/n3dVcLD please see screenshot.

kayteas | Last updated: Mar 10, 2022 09:49AM UTC

already the setup is available. but not work

Ben, PortSwigger Agent | Last updated: Mar 10, 2022 02:06PM UTC

Hi Kayteas, Are you able to share with us the full path for the location that you have placed the jython-standalone-2.7.2.jar file (if you would prefer to do this via email then please feel free to send us an email to support@portswigger.net)? Out of interest, if you copy the jython-standalone-2.7.2.jar file to the root of the C:\ drive on your machine and then select this as the new location within the Options tab in Burp does this allow you to install Python extensions successfully?

kayteas | Last updated: Mar 10, 2022 02:21PM UTC

Hi Ben, I tried it inside the D:/ drive, except for the C:/ drive, but again the result was the same. for jython 2.7.1 and 2.7.2, this is happening, but it's not happening like this on 2.7.0, I'm wondering why this is happening. on my friend computer, jython 2.7.2 (bappstore extensions) is running smoothly.

kayteas | Last updated: Mar 10, 2022 02:35PM UTC

Full path : C:\Users\Kayteassan\Documents\jython-standalone-2.7.2.jar

Ben, PortSwigger Agent | Last updated: Mar 11, 2022 08:05AM UTC

HI Kayteas, There is a known issue when there are Unicode characters within the path to the jython jar file - are there any special characters in your path (it does not look like there is, and the fact you see a similar issue when using the root of the D:\ probably rules this out, but I just want to check as the error you are seeing can be caused by this - perhaps you could share a full screenshot of your path)? If you run the jython-standalone-2.7.2.jar file directly on the command line (via the 'java.exe -jar jython-standalone-2.7.2.jar' command on your Windows machine) - does the jar file run (again, probably a long shot but I just want to confirm there are no issues with the jar file that you have obtained that might be causing this)?

kayteas | Last updated: Mar 11, 2022 10:48AM UTC

java.exe -jar jython-standalone-2.7.2.jar ı run command and I get the following error. ; Exception in thread "main" java.lang.ExceptionInInitializerError at org.python.core.PySystemState.<clinit>(PySystemState.java:73) at org.python.util.jython.main(jython.java:533) Caused by: java.lang.IllegalArgumentException: Cannot create PyString with non-byte value at org.python.core.PyString.<init>(PyString.java:57) at org.python.core.PyString.<init>(PyString.java:70) at org.python.core.PyString.<init>(PyString.java:74) at org.python.core.Py.newString(Py.java:643) at org.python.core.PyJavaType.init(PyJavaType.java:543) at org.python.core.PyType$Registry.createType(PyType.java:477) at org.python.core.PyType$Registry.addFromClass(PyType.java:426) at org.python.core.PyType$Registry.resolveType(PyType.java:352) at org.python.core.PyType$Registry$1.computeValue(PyType.java:208) at org.python.core.PyType$Registry$1.computeValue(PyType.java:202) at java.base/java.lang.ClassValue.getFromHashMap(ClassValue.java:228) at java.base/java.lang.ClassValue.getFromBackup(ClassValue.java:210) at java.base/java.lang.ClassValue.get(ClassValue.java:116) at org.python.core.PyType.fromClass(PyType.java:2137) at org.python.core.PyObject.<init>(PyObject.java:85) at org.python.core.PySingleton.<init>(PySingleton.java:9) at org.python.core.PyNotImplemented.<init>(PyNotImplemented.java:10) at org.python.core.Py.<clinit>(Py.java:66) ... 2 more D:\ drive full path : (jython file) --> D:\jython-standalone-2.7.2.jar but

Ben, PortSwigger Agent | Last updated: Mar 11, 2022 01:29PM UTC

Hi Kayteas, That would seem to suggest that the issue lies with the jython jar file (obviously the jython jar file is not our product and is not something we control but if you cannot run it in isolation then you are not going to be able to use it in conjunction with Burp). Just to rule out any type of file corruption or anything of that nature, can you obtain a fresh copy of the jar file from https://www.jython.org/download.html and try this again? You mention that you were able to use version 2.7.0 successfully in the past - this was on the same machine that you are using now and also when the older jar file was in the same file path?

kayteas | Last updated: Mar 11, 2022 01:54PM UTC

Hi Ben, +You mention that you were able to use version 2.7.0 successfully in the past - this was on the same machine that you are using now and also when the older jar file was in the same file path? - yes, version 2.7.0 of jython is running smoothly on the devices I am currently using.(same path) but version 2.7.1 and 2.7.2 give the same error. + Just to rule out any type of file corruption or anything of that nature, can you obtain a fresh copy of the jar file from https://www.jython.org/download.html and try this again? - yes, I downloaded the latest version from their website again, but it still didn't work.

Ben, PortSwigger Agent | Last updated: Mar 11, 2022 02:35PM UTC

Hi Kayteas, At this point it is probably worth getting in touch with the authors of Jython to see if they have any suggestions. For what it is worth, today I have downloaded the 2.7.2 Jar file on Mac, Linux and Windows based machines and have had no issues running it either independently or in conjunction with Burp and am able to successfully install Python based extensions on each machine. I can only assume that there is either some issue with the file itself (which seems unlikely if you have obtained it more than once) or some conflict with your environment.

kayteas | Last updated: Mar 11, 2022 02:51PM UTC

Hi Ben , although I have tried it on different machines, the same problem exists. can you please try running the latest version in the form of java -jar?

Ben, PortSwigger Agent | Last updated: Mar 11, 2022 03:05PM UTC

Hi Kayteas, Running the 2.7.2 jar file via the command line works successfully for me i.e. simply running java -jar jython-standalone-2.7.2.jar. Loading the jython jar file within Burp also works successfully and lets me install extensions. This is successful on the three main operating systems I have tested on (including Windows 10). Out of interest, are you using a non-English language version of Windows?

kayteas | Last updated: Mar 11, 2022 03:21PM UTC

Hi ben, Yes non-English windows 10 pro (Turkish)

kayteas | Last updated: Mar 11, 2022 03:27PM UTC