forked from hematic/Powershell-Scripts-and-Functions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HMPLogParsing.ps1
36 lines (26 loc) · 783 Bytes
/
HMPLogParsing.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
[xml]$Hitman = get-content "%windir%\ltsvc\packages\hitmanpro\%computername%-clean.xml"
$childnodes = $hitman.DocumentElement.childnodes
foreach($node in $childnodes)
{
If ([Float]$node.score -gt 1)
{
Try{
$Type = $node.type
$Malware = $node.malwarename
$Name = $node.scanners.scanner.Name
$Score = $node.score
$Path = $node.file.path
}
Catch{}
$Output = @"
----------------------------------------------
|Type - $Type
|Category - $Malware
|Malware Name - $Name
|Score = $Score
|Path = $Path
----------------------------------------------
"@
Write-Output $output
}
}