diff --git a/build.gradle b/build.gradle index e6d814d..92d95ff 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -version '1.0.0' +version '1.0.1' buildscript { ext.kotlin_version = '1.4.10' @@ -25,7 +25,7 @@ jar { from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } - exclude 'META-INF/versions/9/*.class','META-INF/*.txt' + exclude 'META-INF/versions/9/*.class','META-INF/*.txt','META-INF/*/*' } repositories { mavenCentral() @@ -44,6 +44,8 @@ dependencies { compile group: 'com.google.guava', name: 'guava', version: '30.1-jre' // https://mvnrepository.com/artifact/org.apache.commons/commons-text compile group: 'org.apache.commons', name: 'commons-text', version: '1.9' +// https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc + compile group: 'org.xerial', name: 'sqlite-jdbc', version: '3.36.0.3' compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" } diff --git a/src/UI/BurpDomain.java b/src/UI/BurpDomain.java index bdf2bae..8e9489e 100644 --- a/src/UI/BurpDomain.java +++ b/src/UI/BurpDomain.java @@ -107,9 +107,13 @@ private void projectSettingActionPerformed(ActionEvent e) { int project = JOptionPane.showConfirmDialog(null,nP,"",JOptionPane.OK_CANCEL_OPTION); if(project==0 && BurpExtender.db.isConnect){ String currentProject = nP.itemList.getSelectedValue(); - BurpExtender.config.put("currentProject", currentProject); - Config.writeJson(BurpExtender.config); - projectDoneAction(currentProject); + if(nP.list.contains(currentProject)){ + BurpExtender.config.put("currentProject", currentProject); + Config.writeJson(BurpExtender.config); + projectDoneAction(currentProject); + }else{ + JOptionPane.showMessageDialog(null,"Must select a project!","No Project",JOptionPane.ERROR_MESSAGE); + } } } @@ -290,16 +294,6 @@ private void initComponents() { subDomainTable.setAutoCreateRowSorter(true); subDomainTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); scrollPane2.setViewportView(subDomainTable); - String[] subDomainColumnNames = {"#", "Domain", "IP", "Time"}; - subDomainModel = new DefaultTableModel(null, subDomainColumnNames){ - @Override - public Class getColumnClass(int column) { return getValueAt(0,column).getClass();} - }; - subDomainTable.setModel(subDomainModel); - subDomainTable.getColumnModel().getColumn(0).setPreferredWidth(50); - subDomainTable.getColumnModel().getColumn(1).setPreferredWidth(385); - subDomainTable.getColumnModel().getColumn(2).setPreferredWidth(160); - subDomainTable.getColumnModel().getColumn(3).setPreferredWidth(160); } panel1.add(scrollPane2, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, @@ -307,20 +301,12 @@ private void initComponents() { //======== scrollPane3 ======== { + + //---- urlTable ---- urlTable.setModel(new DefaultTableModel()); - urlTable.setSurrendersFocusOnKeystroke(true); - urlTable.setAutoCreateRowSorter(true); urlTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); + urlTable.setSurrendersFocusOnKeystroke(true); scrollPane3.setViewportView(urlTable); - String[] urlColumnNames = {"#", "URL", "Time"}; - urlModel = new DefaultTableModel(null, urlColumnNames){ - @Override - public Class getColumnClass(int column) { return getValueAt(0,column).getClass();} - }; - urlTable.setModel(urlModel); - urlTable.getColumnModel().getColumn(0).setPreferredWidth(30); - urlTable.getColumnModel().getColumn(1).setPreferredWidth(750); - urlTable.getColumnModel().getColumn(2).setPreferredWidth(100); } panel1.add(scrollPane3, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, @@ -330,6 +316,25 @@ private void initComponents() { GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); // JFormDesigner - End of component initialization //GEN-END:initComponents + String[] subDomainColumnNames = {"#", "Domain", "IP", "Time"}; + subDomainModel = new DefaultTableModel(null, subDomainColumnNames){ + @Override + public Class getColumnClass(int column) { return getValueAt(0,column).getClass();} + }; + subDomainTable.setModel(subDomainModel); + subDomainTable.getColumnModel().getColumn(0).setPreferredWidth(50); + subDomainTable.getColumnModel().getColumn(1).setPreferredWidth(385); + subDomainTable.getColumnModel().getColumn(2).setPreferredWidth(160); + subDomainTable.getColumnModel().getColumn(3).setPreferredWidth(160); + String[] urlColumnNames = {"#", "URL", "Time"}; + urlModel = new DefaultTableModel(null, urlColumnNames){ + @Override + public Class getColumnClass(int column) { return getValueAt(0,column).getClass();} + }; + urlTable.setModel(urlModel); + urlTable.getColumnModel().getColumn(0).setPreferredWidth(30); + urlTable.getColumnModel().getColumn(1).setPreferredWidth(690); + urlTable.getColumnModel().getColumn(2).setPreferredWidth(160); } public static void addSubDomainToUI(String domain, String ip, String time){ subDomainModel.addRow(new Object[]{BurpExtender.subDomainCount, domain, ip, time}); @@ -447,8 +452,8 @@ public void initBurpDomain(){ private JLabel label7; private JScrollPane scrollPane2; private JTable subDomainTable; - private JTable urlTable; private JScrollPane scrollPane3; + private JTable urlTable; // JFormDesigner - End of variables declaration //GEN-END:variables private static DefaultTableModel subDomainModel; private static DefaultTableModel urlModel; diff --git a/src/burp/BurpExtender.java b/src/burp/BurpExtender.java index 26473b4..d6c8ce0 100644 --- a/src/burp/BurpExtender.java +++ b/src/burp/BurpExtender.java @@ -28,7 +28,7 @@ public class BurpExtender implements IBurpExtender, ITab, IHttpListener{ public static DBUtil db; public static HashSet currentRootDomainSet = new HashSet<>(); public static HashMap config = Config.initDatabaseSetting; - public static final String VERSION = "1.0.0"; + public static final String VERSION = "1.0.1"; public static final String EXTENSION_NAME = "BurpDomain"; @Override public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks){