31 std::map<DWORD, t_section_status>::iterator itr;
34 if (
status == neededStatus) {
48 OUT_PADDED(outs, level,
"\"scanned_sections\" : ");
49 outs << std::dec << scannedCount;
51 if (inaccessibleCount > 0) {
53 OUT_PADDED(outs, level,
"\"inaccessible_sections\" : ");
54 outs << std::dec << inaccessibleCount;
59 OUT_PADDED(outs, level,
"\"unpacked_sections\" : ");
60 outs << std::dec << unpacked;
69 const bool is_short = (jdetails <
JSON_DETAILS2) ?
true :
false;
77 OUT_PADDED(outs, level,
"\"code_scan\" : {\n");
112 isScanData(false), isScanInaccessible(false)
125 void freeExecutableSections(std::map<size_t, PeSection*> §ions);
129 t_scan_status scanUsingBase(IN ULONGLONG load_base, IN std::map<size_t, PeSection*> &remote_code, OUT std::map<DWORD, CodeScanReport::t_section_status> §ionToResult, OUT
PatchList &patchesList);
139 size_t collectPatches(DWORD section_rva, PBYTE orig_code, PBYTE patched_code,
size_t code_size, OUT
PatchList &patchesList);
142 bool isScanInaccessible;
A report from the code scan, generated by CodeScanner.
size_t generateTags(const std::string &reportPath)
size_t countUnpackedSections()
enum pesieve::CodeScanReport::section_status t_section_status
size_t countSectionsWithStatus(const t_section_status neededStatus)
virtual ULONGLONG getRelocBase()
size_t countInaccessibleSections()
virtual const void fieldsToJSON(std::stringstream &outs, size_t level, const pesieve::t_json_level &jdetails)
virtual const bool toJSON(std::stringstream &outs, size_t level, const pesieve::t_json_level &jdetails)
CodeScanReport(HMODULE _module, size_t _moduleSize)
std::map< DWORD, t_section_status > sectionToResult
A scanner for detection of patches in the code.
void setScanInaccessible(bool enable)
void setScanData(bool enable)
virtual CodeScanReport * scanRemote()
CodeScanner(HANDLE hProc, ModuleData &moduleData, RemoteModuleData &remoteModData)
Loads a module from the disk, corresponding to the module in the scanned process' memory.
A base class of all the reports detailing on the output of the performed module's scan.
virtual const bool _toJSON(std::stringstream &outs, size_t level=JSON_LEVEL, const pesieve::t_json_level &jdetails=JSON_BASIC)
A base class for all the scanners operating on module data.
RemoteModuleData & remoteModData
const bool toJSON(std::stringstream &outs, size_t level, bool short_info)
Buffers the defined PE section belonging to the module loaded in the scanned process into the local m...
Buffers the data from the module loaded in the scanned process into the local memory.
enum pesieve::module_scan_status t_scan_status
@ JSON_DETAILS
include the basic list patches in the main JSON report
@ JSON_DETAILS2
include the extended list patches in the main JSON report
Final summary about the scanned process.