Skip to content

Commit

Permalink
锁住图形界面
Browse files Browse the repository at this point in the history
  • Loading branch information
bit4woo committed Aug 5, 2021
1 parent 49b3dda commit 099aa70
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
15 changes: 15 additions & 0 deletions src/GUI/GUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,21 @@ public GUI() {//构造函数
projectMenu.Add();

}
/**
* 仅仅锁住图形界面,不影响后台处理数据
*/
public void lockUnlock() {
if (this.getContentPane().isEnabled()) {
((JTabbedPane)this.getContentPane()).addTab("Locked",null,new JPanel(),null);
((JTabbedPane)this.getContentPane()).setSelectedIndex(3);
this.getContentPane().setEnabled(false);
}else {
this.getContentPane().setEnabled(true);
((JTabbedPane)this.getContentPane()).removeTabAt(3);
((JTabbedPane)this.getContentPane()).setSelectedIndex(0);
}
}


public boolean LoadData(String dbFilePath){
try {//这其中的异常会导致burp退出
Expand Down
11 changes: 10 additions & 1 deletion src/GUI/ProjectMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,16 @@ public void actionPerformed(ActionEvent actionEvent) {

}
});
menuButton.add(detachMenu);
//menuButton.add(detachMenu);

JMenuItem lockMenu = new JMenuItem(new AbstractAction("lock & unlock")
{
@Override
public void actionPerformed(ActionEvent actionEvent) {
BurpExtender.getGui().lockUnlock();
}
});
menuButton.add(lockMenu);

//为了菜单能够区分
File dbFile = GUI.getCurrentDBFile();
Expand Down
2 changes: 1 addition & 1 deletion src/domain/DomainPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static void setDomainResult(DomainManager domainResult) {
DomainPanel.domainResult = domainResult;
}

//流量分析进程需要用到这个变量,标记为volatile以获取正确的值
//流量分析进程需要用到这个变量,标记为volatile以获取正确的值
public volatile static DomainManager domainResult = null;//getter setter
public static DefaultTableModel domainTableModel;
PrintWriter stdout;
Expand Down

0 comments on commit 099aa70

Please sign in to comment.