obfu_report 0.0.2.alpha → 0.0.3.alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/obfu_report/version.rb +1 -1
- data/lib/obfu_report.rb +8 -1
- metadata +1 -1
data/lib/obfu_report/version.rb
CHANGED
data/lib/obfu_report.rb
CHANGED
@@ -10,9 +10,16 @@ module ObfuReport
|
|
10
10
|
# check that input is a string and an array
|
11
11
|
if (string.is_a? String)&&(list.is_a? Array)
|
12
12
|
# iterate each item in the list
|
13
|
+
numb = 0
|
14
|
+
x = ""
|
13
15
|
list.each do |wrd|
|
14
16
|
# look for this word in the string
|
15
|
-
|
17
|
+
numb = wrd.length
|
18
|
+
numb.times do
|
19
|
+
x << "*"
|
20
|
+
end
|
21
|
+
string = string.gsub(/\b#{wrd}\b/, x)
|
22
|
+
x = ""
|
16
23
|
end
|
17
24
|
puts "Obfuscated: #{string}"
|
18
25
|
else
|