From 8b3e5c745bf26257db32234dd50105ddb07682d0 Mon Sep 17 00:00:00 2001 From: Auxilus Date: Fri, 9 Mar 2018 22:14:16 +0530 Subject: [PATCH] fix pipeaudit.rb --- lib/msf/core/exploit/smb/client/pipeaudit.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/msf/core/exploit/smb/client/pipeaudit.rb b/lib/msf/core/exploit/smb/client/pipeaudit.rb index 7df0e82f80..9d84d3b9e1 100644 --- a/lib/msf/core/exploit/smb/client/pipeaudit.rb +++ b/lib/msf/core/exploit/smb/client/pipeaudit.rb @@ -20,10 +20,13 @@ module Exploit::Remote::SMB::Client::PipeAudit if (!pipe_file) print_error("File with named pipes is needed") end - File.open(pipe_file, 'rb') { |f| target_pipes += f.readlines.split("\n")[0] } - target_pipes.each do |pipe| + p_file = File.open(pipe_file).read + vprint_status("File: #{p_file}") + #File.open(pipe_file, 'rb') { |f| target_pipes += f.readlines.split("\n")[0] } + p_file.each_line do |pipe| begin - pipe_name = "#{pipe}" + pipe_name = "#{pipe.to_s.split("\n")[0]}" + print_status("Using pipe #{pipe_name}") pipe_handle = self.simple.create_pipe(pipe_name, 'o') print_status("Accessible pipe found: #{pipe_name}") pipe_found = 1