Class: HeimdallTools::CLI
- Defined in:
- lib/heimdall_tools/cli.rb
Instance Method Summary collapse
- #asff_mapper ⇒ Object
- #aws_config_mapper ⇒ Object
- #burpsuite_mapper ⇒ Object
- #dbprotect_mapper ⇒ Object
- #fortify_mapper ⇒ Object
- #jfrog_xray_mapper ⇒ Object
- #nessus_mapper ⇒ Object
- #netsparker_mapper ⇒ Object
- #nikto_mapper ⇒ Object
- #prowler_mapper ⇒ Object
- #sarif_mapper ⇒ Object
- #scoutsuite_mapper ⇒ Object
- #snyk_mapper ⇒ Object
- #sonarqube_mapper ⇒ Object
- #version ⇒ Object
- #xccdf_results_mapper ⇒ Object
- #zap_mapper ⇒ Object
Methods inherited from Command
Instance Method Details
#asff_mapper ⇒ Object
163 164 165 166 167 168 |
# File 'lib/heimdall_tools/cli.rb', line 163 def asff_mapper hdf = HeimdallTools::ASFFMapper.new(File.read([:json]), securityhub_standards_json_array: [:securityhub_standards].nil? ? nil : [:securityhub_standards].map { |filename| File.read(filename) }).to_hdf File.write([:output], hdf) puts "\rHDF Generated:\n" puts [:output].to_s end |
#aws_config_mapper ⇒ Object
117 118 119 120 121 122 |
# File 'lib/heimdall_tools/cli.rb', line 117 def aws_config_mapper hdf = HeimdallTools::AwsConfigMapper.new([:custom_mapping]).to_hdf File.write([:output], hdf) puts "\rHDF Generated:\n" puts [:output].to_s end |
#burpsuite_mapper ⇒ Object
39 40 41 42 |
# File 'lib/heimdall_tools/cli.rb', line 39 def burpsuite_mapper hdf = HeimdallTools::BurpSuiteMapper.new(File.read([:xml])).to_hdf File.write([:output], hdf) end |
#dbprotect_mapper ⇒ Object
106 107 108 109 110 111 |
# File 'lib/heimdall_tools/cli.rb', line 106 def dbprotect_mapper hdf = HeimdallTools::DBProtectMapper.new(File.read([:xml])).to_hdf File.write([:output], hdf) puts "\rHDF Generated:\n" puts [:output].to_s end |
#fortify_mapper ⇒ Object
9 10 11 12 |
# File 'lib/heimdall_tools/cli.rb', line 9 def fortify_mapper hdf = HeimdallTools::FortifyMapper.new(File.read([:fvdl])).to_hdf File.write([:output], hdf) end |
#jfrog_xray_mapper ⇒ Object
95 96 97 98 99 100 |
# File 'lib/heimdall_tools/cli.rb', line 95 def jfrog_xray_mapper hdf = HeimdallTools::JfrogXrayMapper.new(File.read([:json])).to_hdf File.write([:output], hdf) puts "\rHDF Generated:\n" puts [:output].to_s end |
#nessus_mapper ⇒ Object
57 58 59 60 61 62 63 64 65 |
# File 'lib/heimdall_tools/cli.rb', line 57 def nessus_mapper hdfs = HeimdallTools::NessusMapper.new(File.read([:xml])).to_hdf puts "\nHDF Generated:" hdfs.each_key do |host| File.write("#{[:output_prefix]}-#{host}.json", hdfs[host]) puts "#{[:output_prefix]}-#{host}.json" end end |
#netsparker_mapper ⇒ Object
128 129 130 131 132 133 |
# File 'lib/heimdall_tools/cli.rb', line 128 def netsparker_mapper hdf = HeimdallTools::NetsparkerMapper.new(File.read([:xml])).to_hdf File.write([:output], hdf) puts "\rHDF Generated:\n" puts [:output].to_s end |
#nikto_mapper ⇒ Object
84 85 86 87 88 89 |
# File 'lib/heimdall_tools/cli.rb', line 84 def nikto_mapper hdf = HeimdallTools::NiktoMapper.new(File.read([:json])).to_hdf File.write([:output], hdf) puts "\rHDF Generated:\n" puts [:output].to_s end |
#prowler_mapper ⇒ Object
174 175 176 177 178 179 |
# File 'lib/heimdall_tools/cli.rb', line 174 def prowler_mapper hdf = HeimdallTools::ProwlerMapper.new(File.read([:json])).to_hdf File.write([:output], hdf) puts "\rHDF Generated:\n" puts [:output].to_s end |
#sarif_mapper ⇒ Object
140 141 142 143 144 145 |
# File 'lib/heimdall_tools/cli.rb', line 140 def sarif_mapper hdf = HeimdallTools::SarifMapper.new(File.read([:json])).to_hdf File.write([:output], hdf) puts "\rHDF Generated:\n" puts [:output].to_s end |
#scoutsuite_mapper ⇒ Object
151 152 153 154 155 156 |
# File 'lib/heimdall_tools/cli.rb', line 151 def scoutsuite_mapper hdf = HeimdallTools::ScoutSuiteMapper.new(File.read([:javascript])).to_hdf File.write([:output], hdf) puts "\rHDF Generated:\n" puts [:output].to_s end |
#snyk_mapper ⇒ Object
71 72 73 74 75 76 77 78 |
# File 'lib/heimdall_tools/cli.rb', line 71 def snyk_mapper hdfs = HeimdallTools::SnykMapper.new(File.read([:json]), [:name]).to_hdf puts "\rHDF Generated:\n" hdfs.each_key do |host| File.write("#{[:output_prefix]}-#{host}.json", hdfs[host]) puts "#{[:output_prefix]}-#{host}.json" end end |
#sonarqube_mapper ⇒ Object
30 31 32 33 |
# File 'lib/heimdall_tools/cli.rb', line 30 def sonarqube_mapper hdf = HeimdallTools::SonarQubeMapper.new([:name], [:api_url], [:auth]).to_hdf File.write([:output], hdf) end |
#version ⇒ Object
182 183 184 |
# File 'lib/heimdall_tools/cli.rb', line 182 def version puts VERSION end |
#xccdf_results_mapper ⇒ Object
48 49 50 51 |
# File 'lib/heimdall_tools/cli.rb', line 48 def xccdf_results_mapper hdf = HeimdallTools::XCCDFResultsMapper.new(File.read([:xml])).to_hdf File.write([:output], hdf) end |
#zap_mapper ⇒ Object
19 20 21 22 |
# File 'lib/heimdall_tools/cli.rb', line 19 def zap_mapper hdf = HeimdallTools::ZapMapper.new(File.read([:json]), [:name]).to_hdf File.write([:output], hdf) end |