Method: Rex::Post::Meterpreter::Extensions::Priv::Fs#set_file_mace
- Defined in:
- lib/rex/post/meterpreter/extensions/priv/fs.rb
#set_file_mace(file_path, modified = nil, accessed = nil, created = nil, entry_modified = nil) ⇒ Object
Sets the Modified, Accessed, Created, and Entry Modified attributes of the specified file path. If a nil is supplied for a value, it will not be modified. Otherwise, the times should be instances of the Time class.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/rex/post/meterpreter/extensions/priv/fs.rb', line 54 def set_file_mace(file_path, modified = nil, accessed = nil, created = nil, entry_modified = nil) request = Packet.create_request(COMMAND_ID_PRIV_FS_SET_FILE_MACE) request.add_tlv(TLV_TYPE_FS_FILE_PATH, file_path) request.add_tlv(TLV_TYPE_FS_FILE_MODIFIED, modified.to_i) if (modified) request.add_tlv(TLV_TYPE_FS_FILE_ACCESSED, accessed.to_i) if (accessed) request.add_tlv(TLV_TYPE_FS_FILE_CREATED, created.to_i) if (created) request.add_tlv(TLV_TYPE_FS_FILE_EMODIFIED, entry_modified.to_i) if (entry_modified) client.send_request(request) true end |