From 8c78e28b7ff3fbc7f6a84b6adc417e1ce6ca13a3 Mon Sep 17 00:00:00 2001 From: auth Date: Thu, 2 Jul 2020 14:20:45 +0200 Subject: Added client timeout. Added json imports for pe images. Added wrapper to support streaming strings. --- server/src/image/pe.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'server/src/image') 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 -- cgit v1.2.3