obfu_report 0.0.2.alpha → 0.0.3.alpha
Sign up to get free protection for your applications and to get access to all the features.
- 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
|