From eeafa0b030a017c02d11f95c3efe2f361afbdacf Mon Sep 17 00:00:00 2001 From: auth Date: Fri, 17 Jul 2020 00:27:29 +0200 Subject: Added injection placeholders. --- server/src/image/pe.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'server/src/image') diff --git a/server/src/image/pe.h b/server/src/image/pe.h index c642672..2199411 100644 --- a/server/src/image/pe.h +++ b/server/src/image/pe.h @@ -28,6 +28,9 @@ class image { std::vector> m_relocs; public: + image() = default; + ~image() = default; + image(const std::string_view name) : m_image{nullptr} { if (!io::read_file(name, m_buffer)) { io::logger->error("failed to load image {}.", name); @@ -117,12 +120,12 @@ class image { } } - const auto operator()() { return m_image; } + const auto operator->() { return m_image; } operator bool() const { return m_image != nullptr; } - auto imports() const { return m_imports; } - auto relocs() const { return m_relocs; } - auto sections() const { return m_sections; } + auto &imports() const { return m_imports; } + auto &relocs() const { return m_relocs; } + auto §ions() const { return m_sections; } std::string get_json_imports() { nlohmann::json json; -- cgit v1.2.3