We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94022b5 commit 9ee3e09Copy full SHA for 9ee3e09
examples/asm/get_host_risks.py
@@ -0,0 +1,17 @@
1
+"""Retrieve host risks and subsequent host info for each host risk."""
2
+from censys.asm import Events, HostsAssets
3
+
4
+e = Events()
5
+h = HostsAssets()
6
7
+cursor = e.get_cursor(filters=["HOST_RISK"])
8
+events = e.get_events(cursor)
9
10
+for event in events:
11
+ # only show logbook events with the 'add' tag
12
+ if event["operation"] == "ADD":
13
+ print(event)
14
15
+ # enrich the data of this host_risk with more data from the host itself
16
+ host = h.get_asset_by_id(event["entity"]["ipAddress"])
17
+ print(host)
0 commit comments