MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / find_next_text

Method find_next_text

python/binaryview.py:8908–8941  ·  view source on GitHub ↗

``find_next_text`` searches for string ``text`` occurring in the linear view output starting at the virtual address ``start`` until the end of the BinaryView. :param int start: virtual address to start searching from. :param str text: text to search for :param DisassemblySettings setting

(
	    self, start: int, text: str, settings: Optional[_function.DisassemblySettings] = None,
	    flags: FindFlag = FindFlag.FindCaseSensitive,
	    graph_type: _function.FunctionViewTypeOrName = FunctionGraphType.NormalFunctionGraph
	)

Source from the content-addressed store, hash-verified

8906 return result.value
8907
8908 def find_next_text(
8909 self, start: int, text: str, settings: Optional[_function.DisassemblySettings] = None,
8910 flags: FindFlag = FindFlag.FindCaseSensitive,
8911 graph_type: _function.FunctionViewTypeOrName = FunctionGraphType.NormalFunctionGraph
8912 ) -> Optional[int]:
8913 """
8914 ``find_next_text`` searches for string ``text`` occurring in the linear view output starting at the virtual
8915 address ``start`` until the end of the BinaryView.
8916
8917 :param int start: virtual address to start searching from.
8918 :param str text: text to search for
8919 :param DisassemblySettings settings: disassembly settings
8920 :param FindFlag flags: (optional) defaults to case-insensitive data search
8921
8922 ==================== ============================
8923 FindFlag Description
8924 ==================== ============================
8925 FindCaseSensitive Case-sensitive search
8926 FindCaseInsensitive Case-insensitive search
8927 ==================== ============================
8928 :param FunctionViewType graph_type: the IL to search within
8929 """
8930 if not isinstance(text, str):
8931 raise TypeError("text parameter is not str type")
8932 if settings is None:
8933 settings = _function.DisassemblySettings()
8934 if not isinstance(settings, _function.DisassemblySettings):
8935 raise TypeError("settings parameter is not DisassemblySettings type")
8936
8937 result = ctypes.c_ulonglong()
8938 graph_type = _function.FunctionViewType(graph_type)._to_core_struct()
8939 if not core.BNFindNextText(self.handle, start, text, result, settings.handle, flags, graph_type):
8940 return None
8941 return result.value
8942
8943 def find_next_constant(
8944 self, start: int, constant: int, settings: Optional[_function.DisassemblySettings] = None,

Callers

nothing calls this directly

Calls 3

DisassemblySettingsMethod · 0.80
_to_core_structMethod · 0.45
FunctionViewTypeMethod · 0.45

Tested by

no test coverage detected