10#define LIB_NAME "PE-sieve"
19 std::string report_str =
report_to_json(
report, rtype, args.results_filter, args.json_lvl, level);
20 const size_t report_len = report_str.length();
21 if (!report_len)
return 0;
23 const size_t report_size = report_len + 1;
24 if (json_buf && json_buf_size) {
25 ::memset(json_buf, 0, json_buf_size);
26 size_t max_len = report_len <= (json_buf_size - 1) ? report_len : (json_buf_size - 1);
27 ::memcpy(json_buf, report_str.c_str(), max_len);
42 summary.pid = _args.
pid;
48 summary =
report->scan_report->generateSummary();
52 if (!json_buf_size || IsBadWritePtr(json_buf, json_buf_size)) {
57 if (needed_size && IsBadWritePtr(needed_size,
sizeof(
size_t))) {
58 needed_size =
nullptr;
62 if (json_buf || needed_size) {
63 const size_t report_size =
print_report(*
report, _args, rtype, json_buf, json_buf_size);
65 *needed_size = report_size;
82 MessageBox(NULL, my_info.c_str(),
LIB_NAME, MB_ICONINFORMATION);
The final report about the actions performed on the process: scanning and dumping.
DWORD(__stdcall *_PssCaptureSnapshot)(HANDLE ProcessHandle
std::string report_to_json(const ReportEx &report, const t_report_type rtype, t_results_filter filter, const pesieve::t_json_level &jdetails, size_t start_level=0)
tuple[t_report, str, int] PESieve_scan_ex(t_params params, t_report_type rtype, int buf_size)
std::string info()
The string with the basic information about the scanner.
ReportEx * scan_and_dump(IN const pesieve::t_params args)
The main action performed by PE-sieve: scanning the process and dumping the detected material.
t_report PESieve_scan(t_params params)
The root of the PE-sieve scanner.
size_t print_report(const pesieve::ReportEx &report, const pesieve::t_params args, const t_report_type rtype, char *json_buf, size_t json_buf_size)
The API: definitions of the exported elements that are accessible from PE-sieve DLL.
t_report_type PEsieve_rtype
@ REPORT_NONE
do not output a report
#define PESIEVE_PATCH_VERSION
#define PESIEVE_MINOR_VERSION
#define PESIEVE_MAJOR_VERSION
#define PESIEVE_MICRO_VERSION
DWORD pid
the PID of the process to be scanned
Final summary about the scanned process.