Class BpsSearch

java.lang.Object
ghidra.util.bytesearch.bytepatternsearch.BpsSearch

public class BpsSearch extends Object
This class represents a collection of BpsSearchItem's and their corresponding attributes in support of Ghidra's Byte Pattern Searcher capability.

The design of the XML Parser and its supporting classes, as well as an explanation of the required XML format can be found in BpsXmlParser.

The design of the Byte Pattern Searcher and its supporting sub-capabilities and classes can be found in the "Search For Byte Patterns" page in the help viewer.

This class manages a Search, or list, of BpsSearchItem objects parsed from the <SearchItem> tag. A search is populated by BpsXmlParser and referenced for processing by downstream Byte Pattern Searcher components.

Byte Pattern Search Configurations

Required Variables:

  • searchName – Name of the search collection.

Optional Variables:

  • description – Text description of the pattern collection.
  • submitter – Name of the pattern contributor.
Note: additional attributes may be included on the <Search> tag, they will be stored in a map for filtering and sorting downstream.
  • Constructor Details

    • BpsSearch

      public BpsSearch(String searchName, String generatedKey, List<BpsSearchItem> searchItems)
      Constructor.
      Parameters:
      searchName - name identifying a Search
      generatedKey - unique value across all BpsSearch and BpsSearchItem objects; used for skipping patterns at the <Search> and <SearchItem> levels.
      searchItems - belonging to this Search
  • Method Details

    • getSearchName

      public String getSearchName()
      Returns the name of the Search.
      Returns:
      the name of the Search
    • getId

      public String getId()
      Returns the search ID.
      Returns:
      the search ID
    • getSearchItems

      public List<BpsSearchItem> getSearchItems()
      Returns the list of search items belonging to the Search.
      Returns:
      the list of search items belonging to the Search
    • getDescription

      public String getDescription()
      Returns the description for the search.
      Returns:
      the description for the search
    • getSubmitter

      public String getSubmitter()
      Returns the submitter's identification.
      Returns:
      the submitter's identification
    • getAdditionalAttributes

      public Map<String,String> getAdditionalAttributes()
      Returns the additional attributes parsed from the <Search> tag.
      Returns:
      the additional attributes parsed from the <Search> tag
    • toString

      public String toString()
      Overrides:
      toString in class Object