fix ResourcesManager to parse string table entry

Signed-off-by: Koh M. Nakagawa <tsunekou1019@gmail.com>
This commit is contained in:
Koh M. Nakagawa
2020-06-25 23:06:27 +09:00
parent ddc8b72e6b
commit 96e6fc66ad
18 changed files with 348 additions and 0 deletions
@@ -1,5 +1,6 @@
/* Copyright 2017 R. Thomas
* Copyright 2017 Quarkslab
* Copyright 2020 K. Nakagawa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -104,6 +105,14 @@ void create<ResourcesManager>(py::module& m) {
"``True`` if the resource has the given " RST_CLASS_REF(lief.PE.RESOURCE_TYPES) "",
"type"_a)
.def_property_readonly("has_string_table",
&ResourcesManager::has_string_table,
"``True`` if resources contain " RST_CLASS_REF(lief.PE.ResourceStringTable) "")
.def_property_readonly("string_table",
&ResourcesManager::string_table,
"Return list of " RST_CLASS_REF(lief.PE.ResourceStringTable) " present in the resource")
.def("get_node_type",
static_cast<no_const_func<ResourceNode&, RESOURCE_TYPES>>(&ResourcesManager::get_node_type),
"Return " RST_CLASS_REF(lief.PE.ResourceNode) " with "