Skip to content

Commit

Permalink
Update SearchResultEntryMenu.java
Browse files Browse the repository at this point in the history
  • Loading branch information
bit4woo committed Jul 11, 2024
1 parent 00de8bb commit 49deca2
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/InternetSearch/SearchResultEntryMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import javax.swing.SwingWorker;

import com.bit4woo.utilbox.utils.SystemUtils;
import com.bit4woo.utilbox.utils.TextUtils;

import GUI.GUIMain;
import base.Commons;
import burp.BurpExtender;
import config.ConfigManager;
import config.ConfigName;
Expand Down Expand Up @@ -92,6 +92,21 @@ public void actionPerformed(ActionEvent actionEvent) {
}
});

JMenuItem copyRootDomainItem = new JMenuItem(new AbstractAction("Copy Root Domain") {
@Override
public void actionPerformed(ActionEvent actionEvent) {
try{
java.util.List<String> rootDomains = searchTableModel.getMultipleValue(modelRows,SearchTableHead.RootDomain);
rootDomains = TextUtils.deduplicate(rootDomains);
String textUrls = String.join(System.lineSeparator(), rootDomains);
SystemUtils.writeToClipboard(textUrls);
}
catch (Exception e1)
{
e1.printStackTrace(stderr);
}
}
});

JMenuItem genPortScanCmd = new JMenuItem(new AbstractAction("Copy Port Scan Cmd") {

Expand Down Expand Up @@ -162,6 +177,7 @@ protected Object doInBackground() throws Exception {
this.add(copyUrlItem);
this.add(copyHostItem);
this.add(copyIPItem);
this.add(copyRootDomainItem);
this.add(openURLwithBrowserItem);
this.add(genPortScanCmd);

Expand Down

0 comments on commit 49deca2

Please sign in to comment.