Skip to content

Commit 509ade7

Browse files
authored
Land #20010, adds another Powershell signature for SSH platform
Add Powershell Windows signature for SSH platform identification
2 parents 3d1646d + ce5896d commit 509ade7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/metasploit/framework/ssh/platform.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def self.get_platform_info(ssh_socket, timeout: 10)
5252
info = info.map { |item| item.strip }
5353
info = info.join(', ').to_s
5454
# Windows
55-
elsif info =~ /command not found|is not recognized as an internal or external command/
55+
elsif info =~ /command not found|is not recognized as an internal or external command|is not recognized as the name of a cmdlet, function, script file, or operable/
5656
info = ssh_socket.exec!("systeminfo\n").to_s
5757
/OS Name:\s+(?<os_name>.+)$/ =~ info
5858
/OS Version:\s+(?<os_num>.+)$/ =~ info

0 commit comments

Comments
 (0)