Skip to content

Commit eda5922

Browse files
committed
include between get_string_at and get_ascii_string_at
1 parent 22cc41c commit eda5922

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

python/binaryview.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4231,6 +4231,8 @@ def get_strings(self, start = None, length = None):
42314231
``get_strings`` returns a list of strings defined in the binary in the optional virtual address range:
42324232
``start-(start+length)``
42334233
4234+
Note that this API will only return strings that have been identified by the string-analysis and thus governed by the minimum and maximum length settings and unrelated to the type system.
4235+
42344236
:param int start: optional virtual address to start the string list from, defaults to start of the binary
42354237
:param int length: optional length range to return strings from, defaults to length of the binary
42364238
:return: a list of all strings or a list of strings defined between ``start`` and ``start+length``
@@ -4258,6 +4260,8 @@ def get_string_at(self, addr, partial=False):
42584260
"""
42594261
``get_string_at`` returns the string that falls on given virtual address.
42604262
4263+
.. note:: This returns discovered strings and is therefore governed by `analysis.limits.minStringLength` and other settings. For an alternative API that simply returns any potential c-string at a given location, use :py:BinaryView:`binaryview.get_ascii_string_at`.
4264+
42614265
:param int addr: virtual address to get the string from
42624266
:param bool partial: whether to return a partial string reference or not
42634267
:return: returns the StringReference at the given virtual address, otherwise None.
@@ -4280,7 +4284,9 @@ def get_string_at(self, addr, partial=False):
42804284

42814285
def get_ascii_string_at(self, addr, min_length=4, max_length=None, require_cstring=True):
42824286
"""
4283-
``get_ascii_string_at`` returns the string found at ``addr``
4287+
``get_ascii_string_at`` returns an ascii string found at ``addr``.
4288+
4289+
.. note:: This returns an ascii string irrespective of whether the core analysis identified a string at that location. For an alternative API that uses existing identified strings, use :py:BinaryView:`binaryview.get_string_at`.
42844290
42854291
:param int addr: virtual address to start the string
42864292
:param int min_length: minimum length to define a string

0 commit comments

Comments
 (0)