File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,18 @@ public void unloadDbfile(String dbFilePath) {
182182 saveToDisk ();
183183 }
184184
185+ public void cleanOldThreads () {
186+ try {// 避免这里错误导致保存逻辑的失效
187+ if (gui .getTitlePanel ().getThreadGetTitle () != null ) {
188+ gui .getTitlePanel ().getThreadGetTitle ().stopAll ();// maybe null
189+ gui .getInputQueue ().clear ();
190+ gui .getLiveinputQueue ().clear ();
191+ gui .getHttpsChecked ().clear ();
192+ } // 必须要先结束线程,否则获取数据的操作根本无法结束,因为线程一直通过sync占用资源
193+ } catch (Exception e ) {
194+ e .printStackTrace (BurpExtender .getStderr ());
195+ }
196+ }
185197
186198 /**
187199 * 加载数据库文件:
@@ -192,6 +204,7 @@ public void unloadDbfile(String dbFilePath) {
192204 * @param dbFilePath
193205 */
194206 private boolean loadDataBase (String dbFilePath ) {
207+ cleanOldThreads ();
195208 try {//这其中的异常会导致burp退出
196209 System .out .println ("=================================" );
197210 System .out .println ("==Start Loading Data From: " + dbFilePath + " " + Commons .getNowTimeString () + "==" );
Original file line number Diff line number Diff line change 2020import org .apache .commons .io .FileUtils ;
2121import org .apache .commons .lang3 .StringUtils ;
2222
23- import com .bit4woo .utilbox .utils .SwingUtils ;
24-
2523import GUI .GUIMain ;
2624import base .Commons ;
2725import base .DictFileReader ;
@@ -229,6 +227,7 @@ public void actionPerformed(ActionEvent actionEvent) {
229227 this .addSeparator ();
230228 this .add (lockMenu );
231229 }
230+
232231
233232 public void createNewDb (GUIMain gui ) {
234233 File file = new dbFileChooser ().dialog (false ,".db" );//通过保存对话指定文件,这会是一个空文件。
You can’t perform that action at this time.
0 commit comments