Class: TLSmap::CLI

Inherits:
App
  • Object
show all
Defined in:
lib/tls_map/cli.rb

Overview

TLS mapping

Constant Summary collapse

INTEGRITY =

sha2-256

'42e44f89550365da2bc8d33d87f88b65d85d6474e90f9edb65e0ea6c78f61a53'

Constants inherited from App

App::GNUTLS_URL, App::IANA_URL, App::NSS_URL, App::OPENSSL_URL, App::OPENSSL_URL2

Instance Method Summary collapse

Methods inherited from App

#bulk_search, #export, #search

Constructor Details

#initialize(force = false) ⇒ CLI

Load and parse data from marshalized hash (data/mapping.marshal). It must match the integrity check for security purpose.

Parameters:

  • force (Boolean) (defaults to: false)

    Force parsing even if intigrity check failed (DANGEROUS, may result in command execution vulnerability)



16
17
18
19
20
21
22
23
# File 'lib/tls_map/cli.rb', line 16

def initialize(force = false) # rubocop:disable Lint/MissingSuper
  @storage_location = 'data/'
  @database_name = 'mapping.marshal'
  @database_path = absolute_db_path
  database_exists?
  @tls_map = []
  parse(force)
end

Instance Method Details

#updateObject



50
51
52
53
# File 'lib/tls_map/cli.rb', line 50

def update
  tm = TLSmap::App.new
  tm.export(@database_path, :marshal)
end