-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[REFACT] Moved params info to separate files
- Loading branch information
1 parent
a08689f
commit c78463c
Showing
4 changed files
with
60 additions
and
44 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
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,48 @@ | ||
#include "pe_sieve_params_info.h" | ||
|
||
#include <peconv.h> | ||
#include <Windows.h> | ||
#include <Psapi.h> | ||
|
||
std::string translate_dump_mode(const DWORD dump_mode) | ||
{ | ||
switch (dump_mode) { | ||
case peconv::PE_DUMP_AUTO: | ||
return "autodetect (default)"; | ||
case peconv::PE_DUMP_VIRTUAL: | ||
return "virtual (as it is in the memory, no unmapping)"; | ||
case peconv::PE_DUMP_UNMAP: | ||
return "unmapped (converted to raw using sections' raw headers)"; | ||
case peconv::PE_DUMP_REALIGN: | ||
return "realigned raw (converted raw format to be the same as virtual)"; | ||
} | ||
return "undefined"; | ||
} | ||
|
||
std::string translate_out_filter(const t_output_filter o_filter) | ||
{ | ||
switch (o_filter) { | ||
case OUT_FULL: | ||
return "no filter: dump everything (default)"; | ||
case OUT_NO_DUMPS: | ||
return "don't dump the modified PEs, but save the report"; | ||
case OUT_NO_DIR: | ||
return "don't dump any files"; | ||
} | ||
return "undefined"; | ||
} | ||
|
||
std::string translate_modules_filter(DWORD m_filter) | ||
{ | ||
switch (m_filter) { | ||
case LIST_MODULES_DEFAULT: | ||
return "no filter (as the scanner)"; | ||
case LIST_MODULES_32BIT: | ||
return "32bit only"; | ||
case LIST_MODULES_64BIT: | ||
return "64bit only"; | ||
case LIST_MODULES_ALL: | ||
return "all accessible (default)"; | ||
} | ||
return "undefined"; | ||
} |
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,8 @@ | ||
#pragma once | ||
|
||
#include <iostream> | ||
#include "pe_sieve.h" | ||
|
||
std::string translate_dump_mode(const DWORD dump_mode); | ||
std::string translate_out_filter(const t_output_filter o_filter); | ||
std::string translate_modules_filter(DWORD m_filter); |