Skip to content

Commit

Permalink
修复了一处bug
Browse files Browse the repository at this point in the history
修复了当创建项目之后没有选中就进行下一步操作时的一处系统崩溃问题
  • Loading branch information
0Chencc committed Jan 7, 2022
1 parent c0a1b7e commit fc0f84e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 28 deletions.
6 changes: 4 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version '1.0.0'
version '1.0.1'

buildscript {
ext.kotlin_version = '1.4.10'
Expand All @@ -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()
Expand All @@ -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"
}
Expand Down
55 changes: 30 additions & 25 deletions src/UI/BurpDomain.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

Expand Down Expand Up @@ -290,37 +294,19 @@ 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,
new Insets(0, 0, 0, 5), 0, 0));

//======== 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,
Expand All @@ -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});
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/burp/BurpExtender.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class BurpExtender implements IBurpExtender, ITab, IHttpListener{
public static DBUtil db;
public static HashSet<String> currentRootDomainSet = new HashSet<>();
public static HashMap<String,String> 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){
Expand Down

0 comments on commit fc0f84e

Please sign in to comment.