Class BpsSearchItem
java.lang.Object
ghidra.util.bytesearch.bytepatternsearch.BpsSearchItem
This class represents a parsed search item as used by the Byte Pattern Searcher capability within
Ghidra.
The design of the XML Parser and its supporting classes 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 the search item characteristics parsed from the <SearchItem> XML tag.
Byte Pattern Search Item Configurations
Required Variables:
- patternName – Name of the pattern for referencing.
- wordSize – The pattern word size, resolved from the WordSize attribute from the
<SearchItem>tag. - searchType – The
BpsSearchTypestrategy (table, constant, function, or ordered function search, seeBpsSearchType) which dictates how patterns are searched. - patterns – The
<BpsPattern>collection of search byte sequences.
Optional Variables:
- description – Text explanation detailing the purpose of the search pattern.
- submitter – The contributor who added this pattern to the
BpsSearch.
<Search> tag, they
will be stored in a map for filtering and sorting downstream.-
Constructor Summary
ConstructorsConstructorDescriptionBpsSearchItem(String patternName, String key, int wordSize, BpsSearchType searchType) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the additional attributes map parsed from the<SearchItem>tag.Returns the search item's description.getId()Returns the search item's ID.Returns the pattern name.Returns the pattern's byte collection.Returns the pattern's search type.Returns the submitter of the pattern.intReturns the pattern's word size.
-
Constructor Details
-
BpsSearchItem
Constructor.- Parameters:
patternName- name of patternkey- unique key to facilitate skipping patterns at the<SearchItem>levelwordSize- word size for pattern bytes (e.g. byte-8, word-16, dword-32, qword-64)searchType- how the bytes should be searched
-
-
Method Details
-
getPatternName
-
getId
-
getWordSize
public int getWordSize()Returns the pattern's word size.- Returns:
- the pattern's word size
-
getSearchType
Returns the pattern's search type.- Returns:
- the pattern's search type
-
getPatterns
Returns the pattern's byte collection.- Returns:
- the pattern's byte collection
-
getDescription
Returns the search item's description.- Returns:
- the search item's description
-
getSubmitter
Returns the submitter of the pattern.- Returns:
- the submitter of the pattern
-
getAdditionalAttributes
-