From ec1975b2c499f1639d0926641128d9382bd84485 Mon Sep 17 00:00:00 2001 From: icebaker Date: Sat, 3 Jun 2023 19:31:24 -0300 Subject: security check --- controllers/interfaces/cli.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'controllers/interfaces') diff --git a/controllers/interfaces/cli.rb b/controllers/interfaces/cli.rb index da027f7..5967c75 100644 --- a/controllers/interfaces/cli.rb +++ b/controllers/interfaces/cli.rb @@ -11,6 +11,28 @@ module NanoBot case ARGV[0] when 'version' puts NanoBot::GEM[:version] + exit + when 'security' + result = NanoBot.security + + if result[:encryption] + puts "\n✅ Encryption is enabled and properly working." + puts ' It means that your data is cyrptographed stored in 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 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 '' @@ -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 '' -- cgit v1.2.3