From 3d3a2d475dc7d33ebe54a6181018dd4c07e5ec9b Mon Sep 17 00:00:00 2001 From: Tim Date: Sun, 10 May 2015 14:18:16 +0100 Subject: [PATCH] Add TLV_TYPE_FILE_HASH --- python/meterpreter/ext_server_stdapi.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/meterpreter/ext_server_stdapi.py b/python/meterpreter/ext_server_stdapi.py index 48b4de30..9e487280 100644 --- a/python/meterpreter/ext_server_stdapi.py +++ b/python/meterpreter/ext_server_stdapi.py @@ -307,6 +307,7 @@ TLV_TYPE_FILE_NAME = TLV_META_TYPE_STRING | 1201 TLV_TYPE_FILE_PATH = TLV_META_TYPE_STRING | 1202 TLV_TYPE_FILE_MODE = TLV_META_TYPE_STRING | 1203 TLV_TYPE_FILE_SIZE = TLV_META_TYPE_UINT | 1204 +TLV_TYPE_FILE_HASH = TLV_META_TYPE_RAW | 1206 TLV_TYPE_STAT_BUF = TLV_META_TYPE_COMPLEX | 1220 @@ -1011,7 +1012,7 @@ def stdapi_fs_md5(request, response): m = md5.new() path = packet_get_tlv(request, TLV_TYPE_FILE_PATH)['value'] m.update(open(path, 'rb').read()) - response += tlv_pack(TLV_TYPE_FILE_NAME, m.digest()) + response += tlv_pack(TLV_TYPE_FILE_HASH, m.digest()) return ERROR_SUCCESS, response @meterpreter.register_function @@ -1061,7 +1062,7 @@ def stdapi_fs_sha1(request, response): m = sha.new() path = packet_get_tlv(request, TLV_TYPE_FILE_PATH)['value'] m.update(open(path, 'rb').read()) - response += tlv_pack(TLV_TYPE_FILE_NAME, m.digest()) + response += tlv_pack(TLV_TYPE_FILE_HASH, m.digest()) return ERROR_SUCCESS, response @meterpreter.register_function