-
Notifications
You must be signed in to change notification settings - Fork 17
/
Get-CsIocInfo.psm1
40 lines (37 loc) · 993 Bytes
/
Get-CsIocInfo.psm1
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
37
38
39
40
function Get-CsIocInfo {
<#
.SYNOPSIS
Get details about a custom IOC
.PARAMETER TYPE
The type of the indicator
.PARAMETER VALUE
The string representation of the indicator
#>
[CmdletBinding()]
[OutputType([psobject])]
param(
[Parameter(Mandatory = $true)]
[ValidateSet('sha256','md5','domain','ipv4','ipv6')]
[string]
$Type,
[Parameter(Mandatory = $true)]
[ValidateLength(1,200)]
[string]
$Value
)
process{
$Param = @{
Uri = '/indicators/entities/iocs/v1?type=' + $Type + '&value=' + $Value
Method = 'get'
Header = @{
accept = 'application/json'
'content-type' = 'application/json'
}
}
switch ($PSBoundParameters.Keys) {
'Verbose' { $Param['Verbose'] = $true }
'Debug' { $Param['Debug'] = $true }
}
Invoke-CsAPI @Param
}
}