… | |
… | |
1173 | |
1173 | |
1174 | # return a binary windows FILETIME struct |
1174 | # return a binary windows FILETIME struct |
1175 | sub filetime_now { |
1175 | sub filetime_now { |
1176 | my ($s, $ms) = Time::HiRes::gettimeofday; |
1176 | my ($s, $ms) = Time::HiRes::gettimeofday; |
1177 | |
1177 | |
1178 | pack "Q<", ($s * 1_000_000 + $ms) * 10 + 116_444_736_000_000_000 |
1178 | pack "Q<", ($s * 1_000_000 + $ms) * 10 |
|
|
1179 | + 116_444_736_000_000_000 # 1970-01-01 00:00:00 |
1179 | } |
1180 | } |
1180 | |
1181 | |
1181 | # encode a registry hive |
1182 | # encode a registry hive |
1182 | sub regf_encode($) { |
1183 | sub regf_encode($) { |
1183 | my ($hive) = @_; |
1184 | my ($hive) = @_; |