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
24 25 26 |
# File 'lib/pwn/reports/json.rb', line 24 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 |
# 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.report_payload(opts) File.write( out, ::JSON.pretty_generate( 'title' => payload[:title], 'executive_summary' => payload[:executive_summary], 'findings' => payload[:findings], 'attack_chains' => payload[:attack_chains] ) ) out end |
.help ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/pwn/reports/json.rb', line 28 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 |