generated from gdt050579/appcui-template
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Dropper] + add dummy integration for Dropper with an executables min…
- Loading branch information
1 parent
cae4df7
commit cbd5b72
Showing
6 changed files
with
88 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#pragma once | ||
|
||
#include "IDrop.hpp" | ||
|
||
namespace GView::GenericPlugins::Droppper::Executables | ||
{ | ||
class MZPE : public IDrop | ||
{ | ||
private: | ||
public: | ||
MZPE() = default; | ||
|
||
virtual const char* GetName() override; | ||
virtual ObjectCategory GetGroup() override; | ||
virtual const char* GetOutputExtension() override; | ||
virtual Priority GetPriority() override; | ||
virtual bool ShouldGroupInOneFile() override; | ||
|
||
virtual Result Check(uint64 offset, DataCache& file, unsigned char* prechachedBuffer, uint32 prechachedBufferSize, uint64& start, uint64& end) override; | ||
}; | ||
} // namespace GView::GenericPlugins::Droppper::Executables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
target_sources(Dropper PRIVATE Dropper.cpp SpecialStrings/IpAddress.cpp) | ||
target_sources(Dropper PRIVATE | ||
Dropper.cpp | ||
SpecialStrings/IpAddress.cpp | ||
Executables/MZPE.cpp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#include "Executables.hpp" | ||
|
||
namespace GView::GenericPlugins::Droppper::Executables | ||
{ | ||
constexpr uint16 IMAGE_DOS_SIGNATURE = 0x5A4D; | ||
constexpr uint32 IMAGE_NT_SIGNATURE = 0x00004550; | ||
|
||
const char* MZPE::GetName() | ||
{ | ||
return "MZPE"; | ||
} | ||
|
||
ObjectCategory MZPE::GetGroup() | ||
{ | ||
return ObjectCategory::Executables; | ||
} | ||
|
||
const char* MZPE::GetOutputExtension() | ||
{ | ||
return "mzpe"; | ||
} | ||
|
||
Priority MZPE::GetPriority() | ||
{ | ||
return Priority::Binary; | ||
} | ||
|
||
bool MZPE::ShouldGroupInOneFile() | ||
{ | ||
return false; | ||
} | ||
|
||
Result MZPE::Check(uint64 offset, DataCache& file, unsigned char* prechachedBuffer, uint32 prechachedBufferSize, uint64& start, uint64& end) | ||
{ | ||
CHECK(IsMagicU16(prechachedBuffer, prechachedBufferSize, IMAGE_DOS_SIGNATURE), Result::NotFound, ""); | ||
|
||
return Result::NotFound; | ||
} | ||
|
||
} // namespace GView::GenericPlugins::Droppper::Executables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters