Skip to content

Commit edcd1e3

Browse files
author
HD Moore
committed
Land rapid7#5504, handle cases where the script may be empty
2 parents 1f11cd5 + 537dc6e commit edcd1e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rex/powershell/script.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def initialize(code)
3737

3838
begin
3939
# Open code file for reading
40-
fd = ::File.new(code, 'rb')
40+
fd = ::File.new(code || '', 'rb')
4141
while (line = fd.gets)
4242
@code << line
4343
end

0 commit comments

Comments
 (0)