From 4c02405ab520ca3232aeb359a14fd82ae29e23db Mon Sep 17 00:00:00 2001 From: adfoster-r7 Date: Mon, 13 Dec 2021 13:06:02 +0000 Subject: [PATCH] Ignore stdapi_fs_chmod requirement on windows --- lib/msf/core/post_mixin.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/msf/core/post_mixin.rb b/lib/msf/core/post_mixin.rb index 83c2e980b5..155f9b36bc 100644 --- a/lib/msf/core/post_mixin.rb +++ b/lib/msf/core/post_mixin.rb @@ -283,6 +283,11 @@ module Msf::PostMixin end end + # Windows does not support chmod, but will be defined by default in the file mixin + if session.base_platform == 'windows' + cmd_ids -= [Rex::Post::Meterpreter::Extensions::Stdapi::COMMAND_ID_STDAPI_FS_CHMOD] + end + missing_cmd_ids = (cmd_ids - session.commands) unless missing_cmd_ids.empty? # If there are missing commands, try to load the necessary extension.