Skip to content

Commit

Permalink
[REFACT] Grouped classes related to output processing as
Browse files Browse the repository at this point in the history
"postprocessors"
  • Loading branch information
hasherezade committed Dec 4, 2018
1 parent aac66c3 commit 9a47285
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 17 deletions.
25 changes: 19 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ set (scanners_hdrs
scanners/scanned_modules.h
)

set (postprocessors_hdrs
postprocessors/report_formatter.h
postprocessors/results_dumper.h
postprocessors/pe_reconstructor.h
)

set (postprocessors_srcs
postprocessors/report_formatter.cpp
postprocessors/results_dumper.cpp
postprocessors/pe_reconstructor.cpp
)

set (utils_srcs
utils/process_privilege.cpp
utils/util.cpp
Expand All @@ -69,22 +81,18 @@ set (utils_hdrs
set (srcs
pe_sieve.cpp
pe_sieve_params_info.cpp
report_formatter.cpp
results_dumper.cpp
pe_reconstructor.cpp
color_scheme.h
${scanners_srcs}
${postprocessors_srcs}
${utils_srcs}
)

set (hdrs
pe_sieve.h
pe_sieve_params_info.h
report_formatter.h
results_dumper.h
pe_reconstructor.h
include/pe_sieve_types.h
${scanners_hdrs}
${postprocessors_hdrs}
${utils_hdrs}
)

Expand All @@ -93,12 +101,17 @@ set (rsrc
resources.rc
)

# set filters in Visual Studio project:

SOURCE_GROUP("Source Files\\scanners" FILES ${scanners_srcs} )
SOURCE_GROUP("Header Files\\scanners" FILES ${scanners_hdrs} )

SOURCE_GROUP("Source Files\\utils" FILES ${utils_srcs} )
SOURCE_GROUP("Header Files\\utils" FILES ${utils_hdrs} )

SOURCE_GROUP("Source Files\\postprocessors" FILES ${postprocessors_srcs} )
SOURCE_GROUP("Header Files\\postprocessors" FILES ${postprocessors_hdrs} )

# libs
add_subdirectory (libpeconv/libpeconv)
set ( PECONV_LIB $<TARGET_FILE:libpeconv> CACHE FILE "PEConvLib library path" )
Expand Down
2 changes: 0 additions & 2 deletions dll_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#define PESIEVE_EXPORTS
#include "pe_sieve_api.h"

#include "report_formatter.h"

#define LIB_NAME "PE-sieve"

t_report __stdcall PESieve_scan(t_params args)
Expand Down
2 changes: 1 addition & 1 deletion pe_sieve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "utils/util.h"
#include "utils/process_privilege.h"
#include "results_dumper.h"
#include "postprocessors/results_dumper.h"

HANDLE open_process(DWORD processID)
{
Expand Down
4 changes: 2 additions & 2 deletions pe_sieve.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

#include "pe_sieve_types.h"
#include "scanners/scan_report.h"
#include "report_formatter.h"
#include "postprocessors/report_formatter.h"

static char PESIEVE_VERSION[] = "0.1.5.4-a";
static char PESIEVE_VERSION[] = "0.1.5.4-b";
static DWORD PESIEVE_VERSION_ID = 0x00010504; // 00 01 05 04
static char PESIEVE_URL[] = "https://github.com/hasherezade/pe-sieve";

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pe_reconstructor.h → postprocessors/pe_reconstructor.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <map>

#include "peconv.h"
#include "scanners/artefact_scanner.h"
#include "../scanners/artefact_scanner.h"

class PeReconstructor {
public:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <string>
#include <sstream>

#include "utils\util.h"
#include "../utils/util.h"

bool is_shown_type(t_scan_status status, t_report_filter filter)
{
Expand Down
2 changes: 1 addition & 1 deletion report_formatter.h → postprocessors/report_formatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <iostream>

#include "pe_sieve_types.h"
#include "scanners/scan_report.h"
#include "../scanners/scan_report.h"

typedef enum report_filter {
REPORT_ERRORS = 1,
Expand Down
5 changes: 2 additions & 3 deletions results_dumper.cpp → postprocessors/results_dumper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
#include <Psapi.h>

#include <fstream>

#include "utils\util.h"
#include "utils\workingset_enum.h"
#include "../utils/util.h"
#include "../utils/workingset_enum.h"
#include "pe_reconstructor.h"

#define DIR_SEPARATOR "\\"
Expand Down
File renamed without changes.

0 comments on commit 9a47285

Please sign in to comment.