File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
lib/rex/post/meterpreter/extensions/stdapi/fs Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,10 @@ def File.md5(path)
152
152
153
153
response = client . send_request ( request )
154
154
155
- return response . get_tlv_value ( TLV_TYPE_FILE_HASH )
155
+ # older meterpreter binaries will send FILE_NAME containing the hash
156
+ hash = response . get_tlv_value ( TLV_TYPE_FILE_HASH ) ||
157
+ response . get_tlv_value ( TLV_TYPE_FILE_NAME )
158
+ return hash
156
159
end
157
160
158
161
#
@@ -165,7 +168,10 @@ def File.sha1(path)
165
168
166
169
response = client . send_request ( request )
167
170
168
- return response . get_tlv_value ( TLV_TYPE_FILE_HASH )
171
+ # older meterpreter binaries will send FILE_NAME containing the hash
172
+ hash = response . get_tlv_value ( TLV_TYPE_FILE_HASH ) ||
173
+ response . get_tlv_value ( TLV_TYPE_FILE_NAME )
174
+ return hash
169
175
end
170
176
171
177
#
You can’t perform that action at this time.
0 commit comments