Returns a list of all the strings found withing the resources (if any). This method will scan all entries in the resources directory of the PE, if there is one, and will return a [] with the strings. An empty list will be returned otherwise.
(self)
| 5844 | return mapped_data |
| 5845 | |
| 5846 | def get_resources_strings(self): |
| 5847 | """Returns a list of all the strings found withing the resources (if any). |
| 5848 | |
| 5849 | This method will scan all entries in the resources directory of the PE, if |
| 5850 | there is one, and will return a [] with the strings. |
| 5851 | |
| 5852 | An empty list will be returned otherwise. |
| 5853 | """ |
| 5854 | |
| 5855 | resources_strings = [] |
| 5856 | |
| 5857 | if hasattr(self, "DIRECTORY_ENTRY_RESOURCE"): |
| 5858 | |
| 5859 | for res_type in self.DIRECTORY_ENTRY_RESOURCE.entries: |
| 5860 | if hasattr(res_type, "directory"): |
| 5861 | for resource_id in res_type.directory.entries: |
| 5862 | if hasattr(resource_id, "directory"): |
| 5863 | if ( |
| 5864 | hasattr(resource_id.directory, "strings") |
| 5865 | and resource_id.directory.strings |
| 5866 | ): |
| 5867 | for res_string in list( |
| 5868 | resource_id.directory.strings.values() |
| 5869 | ): |
| 5870 | resources_strings.append(res_string) |
| 5871 | |
| 5872 | return resources_strings |
| 5873 | |
| 5874 | def get_data(self, rva=0, length=None): |
| 5875 | """Get data regardless of the section where it lies on. |