Import-Module SQLite
mount-sqlite -name places -data (resolve-path C:\Users\malware_win7x86\Desktop\places.sqlite)
$places = Get-ChildItem places:\moz_places
foreach ($entry in $places)
{
[datetime]$origin = '1970-01-01 00:00:00'
$visited = $entry.last_visit_date
if ($visited) {
$vtime = $origin.AddSeconds($visited)
} else {
$vtime = 'testing'
}
write-host ""
$entry.url,
$entry.visit_count,
$vtime
}
我很好奇如何处理没有数据的条目。
例如,以下是该脚本的一些输出:
http://sysforensics.org/
1
Exception calling "AddSeconds" with "1" argument(s): "Value to add was out of range.
Parameter name: value"
At line:7 char:28
+ $vtime = $origin.AddSeconds <<<< ($visited)
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
对此有什么想法吗?
谢谢