This repository was archived by the owner on Dec 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed
Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ # coding: utf-8
2+
3+ from pycti import OpenCTIApiClient
4+
5+ # Variables
6+ api_url = "https://demo.opencti.io"
7+ api_token = "YOUR_TOKEN"
8+
9+ # OpenCTI initialization
10+ opencti_api_client = OpenCTIApiClient (api_url , api_token )
11+
12+ # Exact IP match
13+ print ("IP ADDRESS" )
14+ observable = opencti_api_client .stix_cyber_observable .read (
15+ filters = [{"key" : "value" , "values" : ["110.172.180.180" ]}]
16+ )
17+ print (observable )
18+
19+ # Exact File name match
20+ print ("FILE NAME" )
21+ observable = opencti_api_client .stix_cyber_observable .read (
22+ filters = [{"key" : "name" , "values" : ["activeds.dll" ]}]
23+ )
24+ print (observable )
25+
26+ # Exact File name match
27+ print ("FILE MD5" )
28+ observable = opencti_api_client .stix_cyber_observable .read (
29+ filters = [{"key" : "hashes_MD5" , "values" : ["3aad33e025303dbae12c12b4ec5258c1" ]}]
30+ )
31+ print (observable )
Original file line number Diff line number Diff line change 1+ # coding: utf-8
2+
3+ from pycti import OpenCTIApiClient
4+
5+ # Variables
6+ api_url = "https://demo.opencti.io"
7+ api_token = "YOUR_TOKEN"
8+
9+ # OpenCTI initialization
10+ opencti_api_client = OpenCTIApiClient (api_url , api_token )
11+
12+ # Search
13+ observables = opencti_api_client .stix_cyber_observable .list (search = "65.89.87.4" )
14+
15+ print (observables )
You can’t perform that action at this time.
0 commit comments