We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e690583 + 4a0f37d commit 7704c38Copy full SHA for 7704c38
lib/msf/core/post/file.rb
@@ -98,13 +98,14 @@ def exist?(path)
98
return !!(stat)
99
else
100
if session.platform =~ /win/
101
- # XXX
+ f = cmd_exec("cmd.exe /C IF exist \"#{path}\" ( echo true )")
102
103
f = session.shell_command_token("test -e '#{path}' && echo true")
104
- return false if f.nil? or f.empty?
105
- return false unless f =~ /true/
106
- return true
107
end
+
+ return false if f.nil? or f.empty?
+ return false unless f =~ /true/
108
+ return true
109
110
111
0 commit comments