You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/msf/core/post/windows/powershell.rb
+24-2Lines changed: 24 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -36,9 +36,31 @@ def have_powershell?
36
36
defget_dotnet_version
37
37
casesysinfo['OS']
38
38
when/Windows 8|10/
39
-
cmd_out=cmd_exec('wmic /namespace:\\\\root\\cimv2 path win32_optionalfeature where "caption like \'.NET Framework%\' and InstallState = 1" get caption')
39
+
cmd='wmic /namespace:\\\\root\\cimv2 path win32_optionalfeature where "caption like \'.NET Framework%\' and InstallState = 1" get caption'
40
40
else
41
-
cmd_out=cmd_exec('wmic /namespace:\\\\root\\cimv2 path win32_product where "name like \'%%.NET%%\'" get version')
41
+
cmd='wmic /namespace:\\\\root\\cimv2 path win32_product where "name like \'%%.NET%%\'" get version'
0 commit comments