uhide 0.0.25 โ†’ 0.0.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/uhide/main.rb +15 -15
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 00ea66edf2e528cd716a66ad017e304f7c69afb6070f1d07865fbed4d689ddeb
4
- data.tar.gz: 4194a9e449edbf70f12ee01d26ea89f132aa44cd0b4d4c1842f979d06bd0885b
3
+ metadata.gz: a4a06d744fe8a6c1f74e8fd848e74af96ba37d5c377ee3d6b33599f0d38d30c1
4
+ data.tar.gz: 94cf1b71fbe3255fa896e25a53fd474e0bdb0e69677a6ef644944972cc452f0a
5
5
  SHA512:
6
- metadata.gz: db758558903c9ca55602a03591310e1e06748fead358cbca6aef2a147f6b3e2bd551e3c5377896cd22bf80a8b46e7898ea4972c64cde44bf03f26884e20f4ca9
7
- data.tar.gz: ab2b58b83be7090e6457cc7d4fd2c61a1185a9b5b3fbca3aeee4d3c49f7f003f84f978cd0ebafb99ae5871cca3b5b637f0c66e4de5726c97ffcf50aa5ae96c4d
6
+ metadata.gz: 8d6f4416ab7af95df3e132b6651408be6d684847fc2b3740d44e89f28ca717959af688c8043c33782e4fe2dc2142d41121da0bd7f05bb93da47d8bf396fad2da
7
+ data.tar.gz: fb0c709b806ce2cef94508141e21dd062c845db86886657ea63e7a4572431bc962126c7d4f3873ec76cf677d594c28930b49dcaa41697e1362ed4ba99bac8d19
data/lib/uhide/main.rb CHANGED
@@ -4,7 +4,7 @@ $๐Ÿง‚ = -> { ๐Ÿ—ƒ๏ธ '๐Ÿง‚', SecureRandom.random_bytes }
4
4
  $๐Ÿ“ = -> { ๐Ÿ—ƒ๏ธ '๐Ÿ“', ActiveSupport::MessageEncryptor.key_len }
5
5
  INVALID_KEY = 'invalid key'.colorize(:magenta)
6
6
  UNSUPPORTED_๐Ÿ‘พ = 'unsupported'.colorize(:magenta) + ' ๐Ÿ‘พ'
7
- $cache = {}
7
+ $๐Ÿ—„๏ธ = {}
8
8
 
9
9
  def ๐Ÿšฝ
10
10
  print "\r"
@@ -17,32 +17,32 @@ end
17
17
 
18
18
  def โ“ ๐Ÿ”‘, simple: true
19
19
  print ๐Ÿ”‘
20
- password = ๐Ÿงผ STDIN.noecho(&:gets)
21
- $password = password if simple
20
+ โœ๏ธ = ๐Ÿงผ STDIN.noecho(&:gets)
21
+ $โœ๏ธ = โœ๏ธ if simple
22
22
  ๐Ÿšฝ
23
- return password
23
+ return โœ๏ธ
24
24
  end
25
25
 
26
26
  def ๐Ÿ”“ ๐Ÿท๏ธ: nil
27
27
  if ๐Ÿท๏ธ.nil?
28
- puts $cache['ddllv']
28
+ puts $๐Ÿ—„๏ธ['ddllv']
29
29
  else
30
- puts $cache['ddllv'][๐Ÿท๏ธ]
30
+ puts $๐Ÿ—„๏ธ['ddllv'][๐Ÿท๏ธ]
31
31
  end
32
32
 
33
33
  ๐Ÿ“• = File.read './๐Ÿง‚'
34
34
  if ๐Ÿ“•.empty?
35
35
  ๐Ÿ”€ = SecureRandom.random_bytes $๐Ÿ“.call
36
36
  File.write './๐Ÿง‚', Marshal.dump(๐Ÿ”€)
37
- return $cache['๐Ÿง‚'] = ๐Ÿ”€
37
+ return $๐Ÿ—„๏ธ['๐Ÿง‚'] = ๐Ÿ”€
38
38
  else
39
- return $cache['๐Ÿง‚'] = Marshal.load(File.read './๐Ÿง‚')
39
+ return $๐Ÿ—„๏ธ['๐Ÿง‚'] = Marshal.load(File.read './๐Ÿง‚')
40
40
  end
41
41
 
42
42
  end
43
43
 
44
44
  def ๐Ÿ”’ ๐Ÿท๏ธ, ๐Ÿ’Ž
45
- $cache['ddllv'][๐Ÿท๏ธ] = ๐Ÿ’Ž
45
+ $๐Ÿ—„๏ธ['ddllv'][๐Ÿท๏ธ] = ๐Ÿ’Ž
46
46
  ๐Ÿ’พ
47
47
  end
48
48
 
@@ -68,7 +68,7 @@ def ๐Ÿค– ๐Ÿ—ฃ๏ธ
68
68
  exit!
69
69
 
70
70
  when :reset
71
- if โ“($๐Ÿ”‘, simple: false) == $password
71
+ if โ“($๐Ÿ”‘, simple: false) == $โœ๏ธ
72
72
  ['ddllv', '๐Ÿง‚', '๐Ÿ“'].each_entry{ |item| File.delete "./#{item}" }
73
73
  exit!
74
74
  else
@@ -83,10 +83,10 @@ end
83
83
 
84
84
  def ๐Ÿ’พ
85
85
  โš›๏ธ = ActiveSupport::MessageEncryptor.new(
86
- ActiveSupport::KeyGenerator.new($password).generate_key($๐Ÿง‚.call, $๐Ÿ“.call)
86
+ ActiveSupport::KeyGenerator.new($โœ๏ธ).generate_key($๐Ÿง‚.call, $๐Ÿ“.call)
87
87
  )
88
88
 
89
- was_bootstrapped = !(not $cache['ddllv'])
89
+ was_bootstrapped = !(not $๐Ÿ—„๏ธ['ddllv'])
90
90
  ๐Ÿ“– = ๐Ÿ—ƒ๏ธ 'ddllv', {}, โš›๏ธ: โš›๏ธ
91
91
  ๐Ÿ“€ 'ddllv', ๐Ÿ“–, โš›๏ธ: โš›๏ธ if was_bootstrapped
92
92
  end
@@ -104,8 +104,8 @@ def ๐Ÿ“€ ๐Ÿ—‚๏ธ, ๐Ÿ“–, โš›๏ธ: false
104
104
  end
105
105
 
106
106
  def ๐Ÿ—ƒ๏ธ ๐Ÿ—‚๏ธ, ๐Ÿ’Ž, โš›๏ธ: false
107
- if $cache[๐Ÿ—‚๏ธ]
108
- return $cache[๐Ÿ—‚๏ธ]
107
+ if $๐Ÿ—„๏ธ[๐Ÿ—‚๏ธ]
108
+ return $๐Ÿ—„๏ธ[๐Ÿ—‚๏ธ]
109
109
  end
110
110
 
111
111
  begin
@@ -131,7 +131,7 @@ def ๐Ÿ—ƒ๏ธ ๐Ÿ—‚๏ธ, ๐Ÿ’Ž, โš›๏ธ: false
131
131
 
132
132
  end
133
133
 
134
- return $cache[๐Ÿ—‚๏ธ] = ๐Ÿ“–
134
+ return $๐Ÿ—„๏ธ[๐Ÿ—‚๏ธ] = ๐Ÿ“–
135
135
  end
136
136
 
137
137
  class Uhide::Main
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uhide
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.25
4
+ version: 0.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Keen