Skip to content

Commit 3a2433d

Browse files
committed
Remove unneeded filetime read
1 parent 0063d4e commit 3a2433d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/post/windows/gather/enum_prefetch.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,20 +95,20 @@ def gather_prefetch_info(name_offset, hash_offset, lastrun_offset, runcount_offs
9595
hash = client.railgun.kernel32.ReadFile(handle, 4, 4, 4, nil)
9696

9797
# Finds the LastModified/Created timestamp (MACE)
98-
lm = client.priv.fs.get_file_mace(filename)
98+
mtimes = client.priv.fs.get_file_mace(filename)
9999

100100
# Finds the Creation timestamp (MACE)
101-
ct = client.priv.fs.get_file_mace(filename)
101+
#ct = client.priv.fs.get_file_mace(filename)
102102

103103
# Checking and moving the values
104-
if idx.nil? or count.nil? or hash.nil? or lm.nil? or ct.nil?
104+
if idx.nil? or count.nil? or hash.nil? or mtimes.nil? #or ct.nil?
105105
print_error("Error reading file (might be temporary): %s" % filename)
106106
else
107107
pname = Rex::Text.to_ascii(name.slice(0..idx))
108108
prun = count['lpBuffer'].unpack('L*')[0]
109109
phash = hash['lpBuffer'].unpack('h*')[0].reverse
110-
lmod = lm['Modified'].utc
111-
creat = ct['Created'].utc
110+
lmod = mtimes['Modified'].utc
111+
creat = mtimes['Created'].utc
112112
table << [lmod, creat,prun,phash,pname]
113113
end
114114
client.railgun.kernel32.CloseHandle(handle)

0 commit comments

Comments
 (0)