Skip to content

Commit

Permalink
Update BrowserSearchAction.java
Browse files Browse the repository at this point in the history
  • Loading branch information
bit4woo committed Apr 11, 2024
1 parent f1e7da9 commit 63c9d9f
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/InternetSearch/BrowserSearchAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,33 +56,33 @@ public final void actionPerformed(ActionEvent e) {
String searchContent =null;

if (tableModel.getClass().equals(LineTableModel.class)) {
InfoTuple<String, String> result = ((LineTableModel) tableModel).getSearchTypeAndValue(row, columnIndex, engine);
InfoTuple<String, String> result = ((LineTableModel) tableModel).getSearchTypeAndValue(row, columnIndex);
searchType = result.first;
searchContent = result.second;
}

if (tableModel.getClass().equals(SearchTableModel.class)) {
InfoTuple<String, String> result = ((SearchTableModel) tableModel).getSearchTypeAndValue(row, columnIndex, engine);
InfoTuple<String, String> result = ((SearchTableModel) tableModel).getSearchTypeAndValue(row, columnIndex);
searchType = result.first;
searchContent = result.second;
}

if (tableModel.getClass().equals(TargetTableModel.class)) {
InfoTuple<String, String> result = ((TargetTableModel) tableModel).getSearchTypeAndValue(row, columnIndex, engine);
InfoTuple<String, String> result = ((TargetTableModel) tableModel).getSearchTypeAndValue(row, columnIndex);
searchType = result.first;
searchContent = result.second;
}

if (StringUtils.isEmpty(searchContent) || StringUtils.isEmpty(searchType)) {
if (StringUtils.isEmpty(searchContent) || StringUtils.isEmpty(searchType)) return;

searchContent = SearchEngine.buildSearchDork(searchContent, engine, searchType);
String url = buildSearchUrl(engine,searchContent);

try {
Commons.browserOpen(url, null);
} catch (Exception err) {
err.printStackTrace(BurpExtender.getStderr());
}
searchContent = SearchEngine.buildSearchDork(searchContent, engine, searchType);
String url = buildSearchUrl(engine,searchContent);

try {
Commons.browserOpen(url, null);
} catch (Exception err) {
err.printStackTrace(BurpExtender.getStderr());
}
}
}
Expand Down

0 comments on commit 63c9d9f

Please sign in to comment.