diff options
Diffstat (limited to 'server/src/image')
| -rw-r--r-- | server/src/image/pe.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/server/src/image/pe.h b/server/src/image/pe.h index 2f81616..3bbe772 100644 --- a/server/src/image/pe.h +++ b/server/src/image/pe.h @@ -124,6 +124,16 @@ class image { auto imports() const { return m_imports; } auto relocs() const { return m_relocs; } auto sections() const { return m_sections; } + + std::string get_json_imports() { + nlohmann::json json; + for(auto &[mod, imports] : m_imports) { + for(auto &i : imports) { + json[mod].emplace_back(std::make_pair(i.name, i.rva)); + } + } + return json.dump(); + } }; }; // namespace pe
\ No newline at end of file |