Method: Rex::Exploitation::Powershell::Obfu#strip_empty_lines

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

#strip_empty_linesString

Remove empty lines

Returns:

  • (String)

    code without empty lines



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

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

  code
end