StringRecognizer recognizes custom strings found in high level expressions.
More...
StringRecognizer recognizes custom strings found in high level expressions.
|
| | StringRecognizer (const std::string &name) |
| | StringRecognizer (BNStringRecognizer *renderer) |
| std::string | GetName () const |
| virtual bool | IsValidForType (HighLevelILFunction *func, Type *type) |
| | Determines if the string recognizer should be called for the given expression type.
|
| virtual std::optional< DerivedString > | RecognizeConstant (const HighLevelILInstruction &instr, Type *type, int64_t val) |
| | Can be overridden to recognize strings for a constant that is not a pointer.
|
| virtual std::optional< DerivedString > | RecognizeConstantPointer (const HighLevelILInstruction &instr, Type *type, int64_t val) |
| | Can be overridden to recognize strings for a constant pointer.
|
| virtual std::optional< DerivedString > | RecognizeExternPointer (const HighLevelILInstruction &instr, Type *type, int64_t val, uint64_t offset) |
| | Can be overridden to recognize strings for an external symbol.
|
| virtual std::optional< DerivedString > | RecognizeImport (const HighLevelILInstruction &instr, Type *type, int64_t val) |
| | Can be overridden to recognize strings for an imported symbol.
|
| | StaticCoreRefCountObject () |
| virtual | ~StaticCoreRefCountObject () |
| BNStringRecognizer * | GetObject () const |
| void | AddRef () |
| void | Release () |
| void | AddRefForRegistration () |
| void | AddRefForCallback () |
| void | ReleaseForCallback () |
◆ StringRecognizer() [1/2]
| StringRecognizer::StringRecognizer |
( |
const std::string & | name | ) |
|
◆ StringRecognizer() [2/2]
◆ GetName()
| string StringRecognizer::GetName |
( |
| ) |
const |
◆ IsValidForType()
Determines if the string recognizer should be called for the given expression type.
It is optional to override this method. If the method isn't overridden, all expression types are passed to the string recognizer.
- Parameters
-
- Returns
true if the expression should be passed to the string recognizer, false otherwise
Reimplemented in BinaryNinja::CoreStringRecognizer.
◆ RecognizeConstant()
Can be overridden to recognize strings for a constant that is not a pointer.
The expression type and value of the expression are given. If no string is found for this expression, this method should return std::nullopt
If a string is found, return a DerivedString with the string information.
- Parameters
-
| instr | High level expression |
| type | Type of the expression |
| val | Value of the expression |
- Returns
- Optional
DerivedString for any string that is found
Reimplemented in BinaryNinja::CoreStringRecognizer.
◆ RecognizeConstantPointer()
Can be overridden to recognize strings for a constant pointer.
The expression type and value of the expression are given. If no string is found for this expression, this method should return std::nullopt
If a string is found, return a DerivedString with the string information.
- Parameters
-
| instr | High level expression |
| type | Type of the expression |
| val | Value of the expression |
- Returns
- Optional
DerivedString for any string that is found
Reimplemented in BinaryNinja::CoreStringRecognizer.
◆ RecognizeExternPointer()
Can be overridden to recognize strings for an external symbol.
The expression type and value of the expression are given. If no string is found for this expression, this method should return std::nullopt
If a string is found, return a DerivedString with the string information.
- Parameters
-
| instr | High level expression |
| type | Type of the expression |
| val | Value of the expression |
| offset | Offset into the external symbol |
- Returns
- Optional
DerivedString for any string that is found
Reimplemented in BinaryNinja::CoreStringRecognizer.
◆ RecognizeImport()
Can be overridden to recognize strings for an imported symbol.
The expression type and value of the expression are given. If no string is found for this expression, this method should return std::nullopt
If a string is found, return a DerivedString with the string information.
- Parameters
-
| instr | High level expression |
| type | Type of the expression |
| val | Value of the expression |
- Returns
- Optional
DerivedString for any string that is found
Reimplemented in BinaryNinja::CoreStringRecognizer.
◆ Register()
Registers the string recognizer.
- Parameters
-
| recognizer | The string recognizer to register. |
◆ GetByName()
◆ GetRecognizers()