SAX2 driver class org.apache.xercer.parses.SAXParser not found
I'm trying to parse XML from requests in my plugin but every time this error occours:
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
org.xml.sax.SAXException: org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
I'm using the ElementTree to do this parse (import xml.etree.ElementTree as ET).
Someone knows how i can solve this problem? Thanks
Did you include the relevant libraries within your compiled JAR file, or put them into the library folder configured in Extender options?
It’s hard to know what might be going wrong. Burp creates a class loader for each extension, configured to use the extension’s JAR file and any JAR files in the configured library folder. So if your library dependencies are in a correctly structured JAR file in the right location, they should be accessible to the class loader.
Please can you verify the library JAR contents, and if that doesn’t account for the problem, then try copying the .class files from the library JAR into your extension JAR, in the correct folder structure for each package. Normally, this just involves unzipping your JAR and the library JAR, merging the contents, and re-zipping.
I'm programming my extension in Python and this error occur with every module that parse XML (xmltodoct and ElementTree).
I'm tried to import the folder where the jar file of the xerces are in, but it's not worked.
I found a extension that use the same module, and to resolve that problem, they start the jar of the burp with the classpath, and worked to me:
java -classpath burpsuite_pro_v1.7.22.jar;xercesImpl.jar; "C:\Users\Admin\Documents\Burp"/* burp.StartBurp
There is a way to configure the classpath on the burp configurations, so i can open the exe file?
*Link of the extension (https://github.com/luh2/PDFMetadata)
Unzipping the jar your extension depends on into the same directory as the entrypoint script (PdfMetadata.py) seems to allow Jython to reference the class files from Python. You’ll need to keep the structure of the jar file but can delete the META-INF directory. It’s not a perfect solution but it does work.
Let me know if this solves your problem.