Method: Rex::Powershell::Obfu#strip_empty_lines

Defined in:
lib/rex/powershell/obfu.rb

#strip_empty_linesString

Remove empty lines

Returns:

  • (String)

    code without empty lines



32
33
34
35
36
37
38
39
# File 'lib/rex/powershell/obfu.rb', line 32

def strip_empty_lines
  # Windows EOL
  code.gsub!(WINDOWS_EOL_REGEX, "\r\n")
  # UNIX EOL
  code.gsub!(UNIX_EOL_REGEX, "\n")

  code
end