Module: PWN::Reports::JSON
- Defined in:
- lib/pwn/reports/json.rb
Overview
Generic JSON report writer for pentest / findings payloads.
Class Method Summary collapse
Class Method Details
.authors ⇒ Object
25 26 27 |
# File 'lib/pwn/reports/json.rb', line 25 public_class_method def self. "AUTHOR(S):\n 0day Inc. <[email protected]>\n" end |
.generate(opts = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/pwn/reports/json.rb', line 9 public_class_method def self.generate(opts = {}) out = PWN::Reports.resolve_path(opts.merge(ext: 'json')) payload = PWN::Reports.package_evidence(payload: PWN::Reports.report_payload(opts), path: out) File.write( out, ::JSON.pretty_generate( 'title' => payload[:title], 'executive_summary' => payload[:executive_summary], 'priorities' => payload[:priorities], 'findings' => payload[:findings], 'attack_chains' => payload[:attack_chains] ) ) out end |
.help ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/pwn/reports/json.rb', line 29 public_class_method def self.help puts "USAGE: # Run generate and return its result #{self}.generate # Print the AUTHOR(S) string for this module. #{self}.authors " constants.sort end |