Skip to content

Commit

Permalink
[FEATURE] In JSON: print only used parameters and parameters related …
Browse files Browse the repository at this point in the history
…to the scan
  • Loading branch information
hasherezade committed Jul 16, 2023
1 parent 4092a56 commit 43a665c
Showing 1 changed file with 25 additions and 17 deletions.
42 changes: 25 additions & 17 deletions params_info/params_dump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,31 @@ void pesieve::params_fields_to_JSON(pesieve::t_params& params, std::stringstream
OUT_PADDED(outs, level, "\"modules_ignored\" : ");
outs << "\"" << params.modules_ignored.buffer << "\"" << ",\n";
}
OUT_PADDED(outs, level, "\"data\" : ");
outs << std::dec << params.data << ",\n";
if (params.data) {
OUT_PADDED(outs, level, "\"data\" : ");
outs << std::dec << params.data << ",\n";
}
if (params.dotnet_policy) {
OUT_PADDED(outs, level, "\"dotnet_policy\" : ");
outs << std::dec << params.dotnet_policy << ",\n";
}

OUT_PADDED(outs, level, "\"dotnet_policy\" : ");
outs << std::dec << params.dotnet_policy << ",\n";
if (params.make_reflection) {
OUT_PADDED(outs, level, "\"use_reflection\" : ");
outs << std::dec << params.make_reflection << ",\n";
}
if (params.use_cache) {
OUT_PADDED(outs, level, "\"use_cache\" : ");
outs << std::dec << params.use_cache << ",\n";
}
if (params.out_filter) {
OUT_PADDED(outs, level, "\"out_filter\" : ");
outs << std::dec << params.out_filter << ",\n";
}
if (params.imprec_mode) {
OUT_PADDED(outs, level, "\"imprec_mode\" : ");
outs << std::dec << params.imprec_mode << ",\n";
}

OUT_PADDED(outs, level, "\"hooks\" : ");
outs << std::dec << (params.no_hooks ? 0 : 1) << ",\n";
Expand All @@ -27,19 +47,7 @@ void pesieve::params_fields_to_JSON(pesieve::t_params& params, std::stringstream
outs << std::dec << params.shellcode << ",\n";

OUT_PADDED(outs, level, "\"obfuscated\" : ");
outs << std::dec << params.obfuscated << ",\n";

OUT_PADDED(outs, level, "\"use_reflection\" : ");
outs << std::dec << params.make_reflection << ",\n";

OUT_PADDED(outs, level, "\"use_cache\" : ");
outs << std::dec << params.use_cache << ",\n";

OUT_PADDED(outs, level, "\"out_filter\" : ");
outs << std::dec << params.out_filter << ",\n";

OUT_PADDED(outs, level, "\"imprec_mode\" : ");
outs << std::dec << params.imprec_mode << "\n";
outs << std::dec << params.obfuscated << "\n";
}


Expand Down

0 comments on commit 43a665c

Please sign in to comment.