Skip to content

Commit 4cb04b6

Browse files
committed
Revert "Use implicit return for assignment."
This reverts commit 49139cc.
1 parent 21b2697 commit 4cb04b6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/rex/exploitation/jsobfu.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,11 +350,12 @@ def transform_string(str)
350350
return safe_split(str, quote).map { |args| transform_string(args[1]) }.join('+')
351351
end
352352

353-
transformed = case rand(2)
353+
transformed = nil
354+
case rand(2)
354355
when 0
355-
transform_string_split_concat(str, quote)
356+
transformed = transform_string_split_concat(str, quote)
356357
when 1
357-
transform_string_fromCharCode(str)
358+
transformed = transform_string_fromCharCode(str)
358359
end
359360

360361
#$stderr.puts "Obfuscating str: #{str.ljust 30} #{transformed}"

0 commit comments

Comments
 (0)