Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointer Exception when importing into burp #4

Closed
maik-s opened this issue Mar 8, 2019 · 5 comments · Fixed by #5
Closed

NullPointer Exception when importing into burp #4

maik-s opened this issue Mar 8, 2019 · 5 comments · Fixed by #5

Comments

@maik-s
Copy link
Contributor

maik-s commented Mar 8, 2019

Hello,
thanks for providing this addon.
gradle can build it successfully, but importing the .jar file fails in burp.

java.lang.NullPointerException
	at burp.BurpExtender.createNewProfile(BurpExtender.java:60)
	at burp.BurpExtender.setupTab(BurpExtender.java:96)
	at burp.BurpExtender.registerExtenderCallbacks(BurpExtender.java:39)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at burp.is.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:748)

The reason is that the UI-Components like the following in BurpExtender.java

    private JPanel panel;  
    private JTextField accessKey;  
    private JTextField secretKey;  
    private JTextField region;  
    private JTextField service;  
    private JComboBox profileComboBox;

are not generated by the gradle building process correctly.
My guess is because you used the IntelliJ UI Designer.

According to this https://stackoverflow.com/a/38423072/2835625 answer this problem can be resolved very easily.

@egru
Copy link
Member

egru commented Mar 8, 2019

I can build and import the jar file into Burp just fine. I'm building the jar file as an artifact in IntelliJ and it's been working for me. Are you building it with gradle from the command line?

@maik-s
Copy link
Contributor Author

maik-s commented Mar 8, 2019

Yes i am building it with gradle from the command line.

@maik-s
Copy link
Contributor Author

maik-s commented Mar 8, 2019

As far as i understood, IntelliJ defines the UI components in /src/main/java/burp/TabPanel.form and uses this file during the building process.
But gradle cannot interpret this file, hence, the components are uninitialized in BurpExtender.java

From my understanding, all you need to do is to configure IntelliJ (like shown in the stackoverflow comment) to write down the UI component definition into the java source code. By this, gradle will able to build the extension properly, after including

dependencies {
    compile 'com.intellij:forms_rt:7.0.3'
}

in the gradle.build file

@egru
Copy link
Member

egru commented Mar 8, 2019

It should be building correctly now. I had to add that dependency in conjunction with converting the form files to java source instead of them being binaries.

@egru egru closed this as completed Mar 8, 2019
@maik-s
Copy link
Contributor Author

maik-s commented Mar 8, 2019

Now a new error occurs, after importing it into burp

java.lang.ClassNotFoundException: com.intellij.uiDesigner.core.Spacer
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at burp.mhg.a(Unknown Source)
	at burp.mhg.<init>(Unknown Source)
	at burp.spf.a(Unknown Source)
	at burp.gih.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:748)

maik-s added a commit to maik-s/AWSSigner that referenced this issue Mar 8, 2019
This change fixes NetSPI#4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants