1
mirror of https://github.com/rapid7/metasploit-payloads synced 2024-12-21 05:35:54 +01:00

add TLV_TYPE_FILE_HASH

This commit is contained in:
Tim 2015-05-10 15:05:45 +01:00
parent e891c7fcd0
commit 6586bd0df8
2 changed files with 2 additions and 1 deletions

View File

@ -57,6 +57,7 @@ public interface TLVType {
public static final int TLV_TYPE_FILE_NAME = TLVPacket.TLV_META_TYPE_STRING | 1201;
public static final int TLV_TYPE_FILE_PATH = TLVPacket.TLV_META_TYPE_STRING | 1202;
public static final int TLV_TYPE_FILE_MODE = TLVPacket.TLV_META_TYPE_STRING | 1203;
public static final int TLV_TYPE_FILE_HASH = TLVPacket.TLV_META_TYPE_RAW | 1206;
public static final int TLV_TYPE_STAT_BUF = TLVPacket.TLV_META_TYPE_COMPLEX | 1220;
// Net

View File

@ -20,7 +20,7 @@ public abstract class HashCommand implements Command {
while ((len = in.read(buf)) != -1) {
md.update(buf, 0, len);
}
response.add(TLVType.TLV_TYPE_FILE_NAME, new String(md.digest(), "ISO-8859-1"));
response.add(TLVType.TLV_TYPE_FILE_HASH, md.digest());
return ERROR_SUCCESS;
}
}