summaryrefslogtreecommitdiff
path: root/controllers/interfaces
diff options
context:
space:
mode:
authoricebaker <113217272+icebaker@users.noreply.github.com>2023-06-03 20:37:14 -0300
committerGitHub <noreply@github.com>2023-06-03 20:37:14 -0300
commitbffbac01eeb00e5f94cd4d675edc0a0566354265 (patch)
tree39df8578dd2bbed230e0d222d0175e088f97537e /controllers/interfaces
parent2c50a06b68a21ce904e5dfd15833e3569ff64bfa (diff)
parent1be75c768ca9595b54d8e2d5a8287adbc950f659 (diff)
Merge pull request #3 from icebaker/ib-cryptography
Cryptography and Security
Diffstat (limited to 'controllers/interfaces')
-rw-r--r--controllers/interfaces/cli.rb23
-rw-r--r--controllers/interfaces/eval.rb4
2 files changed, 23 insertions, 4 deletions
diff --git a/controllers/interfaces/cli.rb b/controllers/interfaces/cli.rb
index da027f7..ae066cd 100644
--- a/controllers/interfaces/cli.rb
+++ b/controllers/interfaces/cli.rb
@@ -12,6 +12,28 @@ module NanoBot
when 'version'
puts NanoBot::GEM[:version]
exit
+ when 'security'
+ result = NanoBot.security.check
+
+ if result[:encryption]
+ puts "\n✅ Encryption is enabled and properly working."
+ puts ' This means that your data is stored in an encrypted format on your disk.'
+ else
+ puts "\n❌ Encryption is not being utilized to store your content."
+ puts ' This means that your data can be easily read because it is stored in plaintext.'
+ end
+
+ if result[:password]
+ puts "\n✅ A password is being used for the encrypted content."
+ puts ' This means that only those who possess the password can decrypt your data.'
+ else
+ puts "\n❌ No custom password is being used for the encrypted content."
+ puts ' This means that anyone can easily decrypt your data.'
+ end
+
+ puts ''
+
+ exit
when 'help', '', nil
puts ''
puts "Nano Bots #{NanoBot::GEM[:version]}"
@@ -34,6 +56,7 @@ module NanoBot
puts ' nb - STATE-KEY state'
puts ' nb cartridge.yml STATE-KEY state'
puts ''
+ puts ' nb security'
puts ' nb version'
puts ' nb help'
puts ''
diff --git a/controllers/interfaces/eval.rb b/controllers/interfaces/eval.rb
index 5f472ad..9613b28 100644
--- a/controllers/interfaces/eval.rb
+++ b/controllers/interfaces/eval.rb
@@ -1,9 +1,5 @@
# frozen_string_literal: true
-require 'pry'
-require 'rainbow'
-
-require_relative '../../logic/helpers/hash'
require_relative '../../logic/cartridge/affixes'
module NanoBot