Skip to content

Commit 2dd9dcb

Browse files
committed
Dont use native unpack operators!
1 parent 975ddc9 commit 2dd9dcb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/msf/core/post/windows/runas.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@ def create_process_with_logon(domain, user, password, application_name, command_
126126
# @param domain [String] The target user domain
127127
# @param user [String] The target user
128128
# @param password [String] The target user password
129-
# @param application_name [String] The executable to be run, can be
129+
# @param application_name [String] Thn executableived :CloseHandle
130+
# with unexpected arguments
131+
# expected: ("testPhToken")
132+
# got: (n be run, can be
130133
# nil
131134
# @param command_line [String] The command line or process arguments
132135
#
@@ -195,7 +198,7 @@ def parse_process_information(process_information)
195198
fail ArgumentError, 'process_information is nil' if process_information.nil?
196199
fail ArgumentError, 'process_information is empty string' if process_information.empty?
197200

198-
pi = process_information.unpack('LLLL')
201+
pi = process_information.unpack('VVVV')
199202
{ :process_handle => pi[0], :thread_handle => pi[1], :process_id => pi[2], :thread_id => pi[3] }
200203
end
201204

0 commit comments

Comments
 (0)