uhide 0.0.26 → 0.0.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uhide/main.rb +39 -38
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7549fe073a8fe7084cda772418064c3ae4a6ee461ed3aa366cd1f2e36f35fbf9
|
4
|
+
data.tar.gz: 745e42dcf130591deb94f771e5a38ee00201c770d006b13e86ca68c05633d861
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91e97dea996846aaa2b82a6166aae57504615119ad89250187c00c6d87e3abe1ac9f8bdcb66c2b9e45f48e75903c99a65377ec05978eb7b2d88212a7dd7c886d
|
7
|
+
data.tar.gz: ca79538b4400dfcc213f099ce0c72f1404c7751488f726a0f5e4b00c7d8b1ab04d00cf2f2095feadbc05c6719fe7650f4522587b30385e28d6bc5cb41ed3a4de
|
data/lib/uhide/main.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
+
INVALID_🔑 = 'invalid key'.colorize(:magenta)
|
2
|
+
UNSUPPORTED_👾 = 'unsupported'.colorize(:magenta) + ' 👾'
|
3
|
+
|
1
4
|
$☔ = " ☔ > "
|
2
5
|
$🔑 = " 🔑 > "
|
3
6
|
$🧂 = -> { 🗃️ '🧂', SecureRandom.random_bytes }
|
4
7
|
$📏 = -> { 🗃️ '📏', ActiveSupport::MessageEncryptor.key_len }
|
5
|
-
INVALID_KEY = 'invalid key'.colorize(:magenta)
|
6
|
-
UNSUPPORTED_👾 = 'unsupported'.colorize(:magenta) + ' 👾'
|
7
8
|
$🗄️ = {}
|
8
9
|
|
9
10
|
def 🚽
|
@@ -46,41 +47,6 @@ def 🔒 🏷️, 💎
|
|
46
47
|
💾
|
47
48
|
end
|
48
49
|
|
49
|
-
def 🤖 🗣️
|
50
|
-
👾, 🏷️, 💎 = 🗣️.split
|
51
|
-
|
52
|
-
if 👾.nil?
|
53
|
-
return
|
54
|
-
end
|
55
|
-
|
56
|
-
case 👾.to_sym
|
57
|
-
when :get
|
58
|
-
if 🏷️
|
59
|
-
🔓 🏷️: 🏷️
|
60
|
-
else
|
61
|
-
🔓
|
62
|
-
end
|
63
|
-
|
64
|
-
when :set
|
65
|
-
🔒 🏷️, 💎
|
66
|
-
|
67
|
-
when :exit
|
68
|
-
exit!
|
69
|
-
|
70
|
-
when :reset
|
71
|
-
if ❓($🔑, simple: false) == $✍️
|
72
|
-
['ddllv', '🧂', '📏'].each_entry{ |item| File.delete "./#{item}" }
|
73
|
-
exit!
|
74
|
-
else
|
75
|
-
puts INVALID_KEY
|
76
|
-
end
|
77
|
-
|
78
|
-
else
|
79
|
-
puts UNSUPPORTED_👾
|
80
|
-
end
|
81
|
-
|
82
|
-
end
|
83
|
-
|
84
50
|
def 💾
|
85
51
|
⚛️ = ActiveSupport::MessageEncryptor.new(
|
86
52
|
ActiveSupport::KeyGenerator.new($✍️).generate_key($🧂.call, $📏.call)
|
@@ -121,7 +87,7 @@ def 🗃️ 🗂️, 💎, ⚛️: false
|
|
121
87
|
begin
|
122
88
|
📖 = ⚛️.decrypt_and_verify 📕
|
123
89
|
rescue ActiveSupport::MessageVerifier::InvalidSignature
|
124
|
-
puts
|
90
|
+
puts INVALID_🔑
|
125
91
|
exit!
|
126
92
|
end
|
127
93
|
|
@@ -134,6 +100,41 @@ def 🗃️ 🗂️, 💎, ⚛️: false
|
|
134
100
|
return $🗄️[🗂️] = 📖
|
135
101
|
end
|
136
102
|
|
103
|
+
def 🤖 🗣️
|
104
|
+
👾, 🏷️, 💎 = 🗣️.split
|
105
|
+
|
106
|
+
if 👾.nil?
|
107
|
+
return
|
108
|
+
end
|
109
|
+
|
110
|
+
case 👾.to_sym
|
111
|
+
when :get
|
112
|
+
if 🏷️
|
113
|
+
🔓 🏷️: 🏷️
|
114
|
+
else
|
115
|
+
🔓
|
116
|
+
end
|
117
|
+
|
118
|
+
when :set
|
119
|
+
🔒 🏷️, 💎
|
120
|
+
|
121
|
+
when :exit
|
122
|
+
exit!
|
123
|
+
|
124
|
+
when :reset
|
125
|
+
if ❓($🔑, simple: false) == $✍️
|
126
|
+
['ddllv', '🧂', '📏'].each_entry { |item| File.delete "./#{item}" }
|
127
|
+
exit!
|
128
|
+
else
|
129
|
+
puts INVALID_🔑
|
130
|
+
end
|
131
|
+
|
132
|
+
else
|
133
|
+
puts UNSUPPORTED_👾
|
134
|
+
end
|
135
|
+
|
136
|
+
end
|
137
|
+
|
137
138
|
class Uhide::Main
|
138
139
|
class << self
|
139
140
|
def start()
|