Class MaskedByteSequenceByteMatcher
java.lang.Object
ghidra.features.base.memsearch.matcher.UserInputByteMatcher
ghidra.features.base.memsearch.matcher.MaskedByteSequenceByteMatcher
- All Implemented Interfaces:
ByteMatcher<SearchData>
ByteMatcher where the user search input has been parsed into a sequence of bytes and
masks to be used for searching a byte sequence.-
Field Summary
Fields inherited from class ghidra.features.base.memsearch.matcher.UserInputByteMatcher
searchData -
Constructor Summary
ConstructorsConstructorDescriptionMaskedByteSequenceByteMatcher(String input, byte[] bytes, byte[] masks, SearchSettings settings) Constructor that includes a mask byte for each search byte.MaskedByteSequenceByteMatcher(String input, byte[] bytes, SearchSettings settings) Constructor where no masking will be required. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getBytes()Returns a description of what this byte matcher matches.byte[]getMask()Returns additional information about this byte matcher.match(ExtendedByteSequence byteSequence) Returns anIterablefor returning matches within the given byte sequence.Methods inherited from class ghidra.features.base.memsearch.matcher.UserInputByteMatcher
equals, getInput, getName, getSearchData, getSettings, hashCode, isValidInput, isValidSearch, toString
-
Constructor Details
-
MaskedByteSequenceByteMatcher
Constructor where no masking will be required. The bytes must match exactly.- Parameters:
input- the input text used to create this matcherbytes- the sequence of bytes to use for searchingsettings- theSearchSettingsused to parse the input text
-
MaskedByteSequenceByteMatcher
public MaskedByteSequenceByteMatcher(String input, byte[] bytes, byte[] masks, SearchSettings settings) Constructor that includes a mask byte for each search byte.- Parameters:
input- the input text used to create this matcherbytes- the sequence of bytes to use for searchingmasks- the sequence of mask bytes to use for search. Each mask byte will be applied to the bytes being search before comparing them to the target bytes.settings- theSearchSettingsused to parse the input text
-
-
Method Details
-
match
Description copied from class:UserInputByteMatcherReturns anIterablefor returning matches within the given byte sequence.- Specified by:
matchin interfaceByteMatcher<SearchData>- Specified by:
matchin classUserInputByteMatcher- Parameters:
byteSequence- the byte sequence to search- Returns:
- an iterable for return matches in the given sequence
-
getDescription
Description copied from class:UserInputByteMatcherReturns a description of what this byte matcher matches. (Typically a sequence of bytes)- Specified by:
getDescriptionin interfaceByteMatcher<SearchData>- Specified by:
getDescriptionin classUserInputByteMatcher- Returns:
- a description of what this byte matcher matches
-
getToolTip
Description copied from class:UserInputByteMatcherReturns additional information about this byte matcher. (Typically the mask bytes)- Specified by:
getToolTipin classUserInputByteMatcher- Returns:
- additional information about this byte matcher
-
getBytes
public byte[] getBytes() -
getMask
public byte[] getMask()
-