From 95e2c388c41fea56f01464c4f78595effc677b05 Mon Sep 17 00:00:00 2001 From: William Vu Date: Thu, 20 Sep 2018 22:19:18 -0500 Subject: [PATCH 1/2] Remove stray quote from raise in writable? method Didn't break the string but looked funny. --- lib/msf/core/post/file.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/msf/core/post/file.rb b/lib/msf/core/post/file.rb index 16ed619344..3ebfb2f06d 100644 --- a/lib/msf/core/post/file.rb +++ b/lib/msf/core/post/file.rb @@ -143,7 +143,7 @@ module Msf::Post::File # @return [Boolean] true if +path+ exists and is writable # def writable?(path) - raise "writable?' method does not support Windows systems" if session.platform == 'windows' + raise "writable? method does not support Windows systems" if session.platform == 'windows' cmd_exec("test -w '#{path}' && echo true").to_s.include? 'true' end From 3bc0a821d51a50b7554868bb8628ab24466989a4 Mon Sep 17 00:00:00 2001 From: William Vu Date: Thu, 20 Sep 2018 22:49:05 -0500 Subject: [PATCH 2/2] Prefer ye olde TeX-style quotes This was @bcoles' initial commit. I agree. Looks good with the raise. --- lib/msf/core/post/file.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/msf/core/post/file.rb b/lib/msf/core/post/file.rb index 3ebfb2f06d..8cbe7640c0 100644 --- a/lib/msf/core/post/file.rb +++ b/lib/msf/core/post/file.rb @@ -143,7 +143,7 @@ module Msf::Post::File # @return [Boolean] true if +path+ exists and is writable # def writable?(path) - raise "writable? method does not support Windows systems" if session.platform == 'windows' + raise "`writable?' method does not support Windows systems" if session.platform == 'windows' cmd_exec("test -w '#{path}' && echo true").to_s.include? 'true' end