forked from shaniacht1/content
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautomation-AlgosecGetNetworkObject.yml
More file actions
41 lines (39 loc) · 1017 Bytes
/
automation-AlgosecGetNetworkObject.yml
File metadata and controls
41 lines (39 loc) · 1017 Bytes
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
41
args:
- default: true
description: The IP/Subnet to search
name: address
required: true
- auto: PREDEFINED
description: The search method for the address (default is INTERSECT)
name: type
predefined:
- INTERSECT
- CONTAINED
- CONTAINING
- EXACT
comment: Find network objects related to IP address
commonfields:
id: AlgosecGetNetworkObject
version: -1
dependson:
must:
- algosec-get-network-object
name: AlgosecGetNetworkObject
runonce: false
script: |2
resp = demisto.executeCommand("algosec-get-network-object", demisto.args())
if isError(resp[0]):
demisto.results(resp)
else:
data = [demisto.get(entry, "Contents") for entry in resp]
if data:
data = data if isinstance(data, list) else [data]
data = flattenTable(data)
demisto.results({"ContentsFormat": formats["table"], "Type": entryTypes["note"], "Contents": data} )
else:
demisto.results("No results.")
scripttarget: 0
system: true
tags:
- Algosec
type: python