Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bit4woo committed Dec 31, 2023
1 parent 2a5b147 commit 084b2a8
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
18 changes: 16 additions & 2 deletions src/title/LineTableModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,7 @@ public void removeRowsNotInTargets() {
}
String url = entry.getUrl();
String host = entry.getHost();
int port = entry.getPort();
if (entry.getCertDomainSet().contains("ingress.local")){
continue;
}
Expand All @@ -647,11 +648,12 @@ public void removeRowsNotInTargets() {
titleDao.deleteTitleByUrl(url);//写入数据库
stdout.println("!!! "+url+" deleted");
this.fireTableRowsDeleted(i,i);
continue;
}

//规则2,注意,像ingress.local这种也会被删除
//规则2,根据证书域名进行判断,注意,像ingress.local这种也会被删除
Set<String> certDomains = entry.getCertDomainSet();
if (certDomains.size()>0) {//无证书信息的记录不处理
if (certDomains.size()>0) {

int uselessCount = 0;
for (String domain:certDomains) {
Expand All @@ -671,6 +673,18 @@ public void removeRowsNotInTargets() {
titleDao.deleteTitleByUrl(url);//写入数据库
stdout.println("!!! "+url+" deleted");
this.fireTableRowsDeleted(i,i);
continue;
}
}else {
//无证书信息,并且自定义资产中不包含的,删除
Set<String> customIP = guiMain.getDomainPanel().getDomainResult().getSpecialPortTargets();

if (!customIP.contains(host) && !customIP.contains(host+":"+port)) {
lineEntries.remove(i);
titleDao.deleteTitleByUrl(url);//写入数据库
stdout.println("!!! "+url+" deleted");
this.fireTableRowsDeleted(i,i);
continue;
}
}
} catch (Exception e) {
Expand Down
12 changes: 10 additions & 2 deletions src/title/search/SearchMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@ public void actionPerformed(ActionEvent actionEvent) {
searchField.setText(expresstion);
}
});

JMenuItem CDNItems = new JMenuItem(new AbstractAction("CDN: REGEX:Via:|X-Cache") {
@Override
public void actionPerformed(ActionEvent actionEvent) {
searchField.setText("REGEX:Via:|X-Cache");
}
});

JMenuItem DNSRecord = new JMenuItem(new AbstractAction("DNS Records Items: SOURCE:certain && status <=0") {
@Override
public void actionPerformed(ActionEvent actionEvent) {
Expand All @@ -131,6 +131,13 @@ public void actionPerformed(ActionEvent actionEvent) {
}
});

JMenuItem NotDefaultPort = new JMenuItem(new AbstractAction("Not Default Port Items: PORT!=80 && PORT!=443") {
@Override
public void actionPerformed(ActionEvent actionEvent) {
searchField.setText("PORT!=80 && PORT!=443");
}
});

JMenuItem caseSensitive = new JMenuItem(new AbstractAction("Case Sensitive") {
@Override
public void actionPerformed(ActionEvent actionEvent) {
Expand Down Expand Up @@ -164,6 +171,7 @@ public void actionPerformed(ActionEvent actionEvent) {
this.add(ManualSaved);
this.add(DNSRecord);
this.add(CDNItems);
this.add(NotDefaultPort);
this.addSeparator();//分割线
this.add(caseSensitive);
}
Expand Down

0 comments on commit 084b2a8

Please sign in to comment.