HaveF / idapython

Automatically exported from code.google.com/p/idapython
Other
2 stars 0 forks source link

Helper class Strings in idautils.py returns 0 elements #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Execute the sample code in the class documentation located at 
idautils.py:379:

379.        s = Strings()
380.
381.        for i in s:
382.            print "%x: len=%d type=%d -> '%s'" % (i.ea, i.length, i.type, 
str(i))

What is the expected output? What do you see instead?
All the strings inside the current database should be displayed. Instead, none 
is displayed.

What version of the product are you using? On what operating system?
IDA 5.6

Please provide any additional information below.
The problem resides in the class __init__ method:

412.    def __init__(self, default_setup=True):
413.        if default_setup:
414.            self.setup()
415.        self._si  = idaapi.string_info_t()
416.        self.size = 0

The strings list in IDA is refreshed by a method invoked inside setup() ans the 
internal variable size is set appropriately. Later at line 416 it's set to 0 
losing the correct size of the strings list in IDA.

Original issue reported on code.google.com by sebastianmuniz on 29 Jul 2010 at 10:24

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r319.

Original comment by elias.ba...@gmail.com on 2 Aug 2010 at 2:13