opensecret 0.0.962 → 0.0.988
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -10
- data/bin/opensecret +3 -4
- data/bin/ops +5 -0
- data/lib/extension/string.rb +114 -0
- data/lib/factbase/facts.opensecret.io.ini +9 -21
- data/lib/interprete/begin.rb +232 -0
- data/lib/interprete/cmd.rb +621 -0
- data/lib/{plugins/usecases/unlock.rb → interprete/export.rb} +25 -70
- data/lib/interprete/init.rb +205 -0
- data/lib/interprete/key.rb +119 -0
- data/lib/interprete/open.rb +148 -0
- data/lib/{plugins/usecases → interprete}/put.rb +19 -6
- data/lib/{plugins/usecases → interprete}/safe.rb +2 -1
- data/lib/{plugins/usecases/lock.rb → interprete/seal.rb} +24 -34
- data/lib/interprete/set.rb +46 -0
- data/lib/interprete/use.rb +43 -0
- data/lib/interpreter.rb +165 -0
- data/lib/keytools/binary.map.rb +245 -0
- data/lib/keytools/digester.rb +245 -0
- data/lib/keytools/doc.conversion.to.ones.and.zeroes.ruby +179 -0
- data/lib/keytools/doc.rsa.radix.binary-mapping.ruby +190 -0
- data/lib/keytools/doc.star.schema.strategy.txt +77 -0
- data/lib/keytools/doc.using.pbkdf2.kdf.ruby +95 -0
- data/lib/keytools/doc.using.pbkdf2.pkcs.ruby +266 -0
- data/lib/keytools/kdf.bcrypt.rb +180 -0
- data/lib/keytools/kdf.pbkdf2.rb +164 -0
- data/lib/keytools/key.data.rb +227 -0
- data/lib/keytools/key.derivation.rb +341 -0
- data/lib/keytools/key.module.rb +140 -0
- data/lib/keytools/key.rb +481 -0
- data/lib/logging/gem.logging.rb +1 -2
- data/lib/modules/cryptology.md +43 -0
- data/lib/{plugins/ciphers → modules/cryptology}/aes-256.rb +6 -0
- data/lib/{crypto → modules/cryptology}/amalgam.rb +6 -0
- data/lib/modules/cryptology/blowfish.rb +130 -0
- data/lib/modules/cryptology/cipher.rb +207 -0
- data/lib/modules/cryptology/collect.rb +118 -0
- data/lib/{plugins → modules/cryptology}/crypt.io.rb +5 -0
- data/lib/{crypto → modules/cryptology}/engineer.rb +7 -1
- data/lib/{crypto → modules/cryptology}/open.bcrypt.rb +0 -0
- data/lib/modules/mappers/collateral.rb +282 -0
- data/lib/modules/mappers/dictionary.rb +288 -0
- data/lib/modules/mappers/envelope.rb +127 -0
- data/lib/modules/mappers/settings.rb +170 -0
- data/lib/modules/storage/coldstore.rb +186 -0
- data/lib/{opensecret/plugins.io/git/git.flow.rb → modules/storage/git.store.rb} +11 -0
- data/lib/notepad/scratch.pad.rb +17 -0
- data/lib/session/fact.finder.rb +13 -0
- data/lib/session/require.gem.rb +5 -0
- data/lib/store-commands.txt +180 -0
- data/lib/version.rb +1 -1
- data/opensecret.gemspec +5 -6
- metadata +74 -29
- data/lib/crypto/blowfish.rb +0 -85
- data/lib/crypto/collect.rb +0 -140
- data/lib/crypto/verify.rb +0 -33
- data/lib/opensecret.rb +0 -236
- data/lib/plugins/cipher.rb +0 -203
- data/lib/plugins/ciphers/blowfish.rb +0 -126
- data/lib/plugins/coldstore.rb +0 -181
- data/lib/plugins/envelope.rb +0 -116
- data/lib/plugins/secrets.uc.rb +0 -94
- data/lib/plugins/usecase.rb +0 -239
- data/lib/plugins/usecases/init.rb +0 -145
- data/lib/plugins/usecases/open.rb +0 -108
- data/lib/session/attributes.rb +0 -279
- data/lib/session/dictionary.rb +0 -191
- data/lib/session/file.path.rb +0 -53
- data/lib/session/session.rb +0 -80
data/lib/session/file.path.rb
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby
|
2
|
-
# coding: utf-8
|
3
|
-
|
4
|
-
module OpenSession
|
5
|
-
|
6
|
-
require 'inifile'
|
7
|
-
require 'singleton'
|
8
|
-
|
9
|
-
class FilePath
|
10
|
-
|
11
|
-
# Get the directory that the session context file either does
|
12
|
-
# or will sit inside.
|
13
|
-
#
|
14
|
-
# The directory hangs off the home directory and is named simply
|
15
|
-
# as the dot prefixed context_name.
|
16
|
-
#
|
17
|
-
# @example ~/.openbox is the directory for context "openbox"
|
18
|
-
#
|
19
|
-
# @param context_name [String] name of program (or use case) context
|
20
|
-
# @return [String] path to directory holding context configuration file
|
21
|
-
def self.context_path context_name
|
22
|
-
|
23
|
-
return File.join home_directory, ".#{context_name}"
|
24
|
-
|
25
|
-
end
|
26
|
-
|
27
|
-
|
28
|
-
# On non-windows systems the home directory is defined
|
29
|
-
# perfectly by Ruby's Dir object.
|
30
|
-
#
|
31
|
-
# On Windows we sometimes get /AppData/Roaming appended
|
32
|
-
# onto the actual home directory. In these cases this
|
33
|
-
# method removes it.
|
34
|
-
#
|
35
|
-
# @return [String] the path to the machine user's home directory
|
36
|
-
def self.home_directory
|
37
|
-
|
38
|
-
return Dir.home unless Gem.win_platform?
|
39
|
-
|
40
|
-
extraneous_path = "/AppData/Roaming"
|
41
|
-
if Dir.home.end_with? extraneous_path then
|
42
|
-
return Dir.home.gsub( extraneous_path, "" )
|
43
|
-
end
|
44
|
-
|
45
|
-
return Dir.home
|
46
|
-
|
47
|
-
end
|
48
|
-
|
49
|
-
|
50
|
-
end
|
51
|
-
|
52
|
-
|
53
|
-
end
|
data/lib/session/session.rb
DELETED
@@ -1,80 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby
|
2
|
-
# coding: utf-8
|
3
|
-
|
4
|
-
module OpenSession
|
5
|
-
|
6
|
-
# Data and session attributes that span or have relevance across the
|
7
|
-
# entire runtime software instantiation.
|
8
|
-
#
|
9
|
-
# The sessiondata includes information on the user, the home directory,
|
10
|
-
# the session-wide reference time stamp and the session context.
|
11
|
-
class Session
|
12
|
-
include Singleton
|
13
|
-
|
14
|
-
# The session context is derived from the module name of the caller
|
15
|
-
# of the {self.set_context} method.
|
16
|
-
attr_accessor :context
|
17
|
-
|
18
|
-
|
19
|
-
# Read the software context by looking at the name of the module
|
20
|
-
# that is calling this method.
|
21
|
-
#
|
22
|
-
# @example
|
23
|
-
# If the caller is registered as OpenTools::Hammer the session
|
24
|
-
# context name is opentools
|
25
|
-
#
|
26
|
-
# The context name derivation simply pulls out the module name from
|
27
|
-
# the stack trace and downcases it.
|
28
|
-
############ def set_context
|
29
|
-
|
30
|
-
########### module_name = File.basename caller_locations(1,1).first.absolute_path, ".rb"
|
31
|
-
######## @context = module_name.downcase
|
32
|
-
|
33
|
-
########### end
|
34
|
-
|
35
|
-
|
36
|
-
# On non-windows systems the home directory is defined
|
37
|
-
# perfectly by Ruby's Dir object.
|
38
|
-
#
|
39
|
-
# On Windows we sometimes get /AppData/Roaming appended
|
40
|
-
# onto the actual home directory. In these cases this
|
41
|
-
# method removes it.
|
42
|
-
#
|
43
|
-
# @return [String] the path to the machine user's home directory
|
44
|
-
def home_directory
|
45
|
-
|
46
|
-
return Dir.home unless Gem.win_platform?
|
47
|
-
|
48
|
-
extraneous_path = "/AppData/Roaming"
|
49
|
-
if Dir.home.end_with? extraneous_path then
|
50
|
-
return Dir.home.gsub( extraneous_path, "" )
|
51
|
-
end
|
52
|
-
|
53
|
-
return Dir.home
|
54
|
-
|
55
|
-
end
|
56
|
-
|
57
|
-
|
58
|
-
#
|
59
|
-
# Get the username of the logged in user. This name should
|
60
|
-
# not contain spaces (and should be just alphanumeric).
|
61
|
-
#
|
62
|
-
# The current implementation uses environment variables and
|
63
|
-
# crudely states that the username is
|
64
|
-
#
|
65
|
-
# - ENV['USERNAME'] for the Windows platform
|
66
|
-
# - ENV['USER'] for Linux (and everything else)
|
67
|
-
#
|
68
|
-
# @return [String] the username of the machine user
|
69
|
-
def username
|
70
|
-
|
71
|
-
return ENV['USERNAME'] if Gem.win_platform?
|
72
|
-
return ENV['USER']
|
73
|
-
|
74
|
-
end
|
75
|
-
|
76
|
-
|
77
|
-
end
|
78
|
-
|
79
|
-
|
80
|
-
end
|