-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
financial observable creation examples
- Loading branch information
1 parent
093f0f4
commit 017cc03
Showing
5 changed files
with
84 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# coding: utf-8 | ||
|
||
from pycti import OpenCTIApiClient | ||
|
||
# Variables | ||
api_url = "http://localhost:4000" | ||
api_token = "6C2C9EAE-6FF5-4421-B118-74A3CA5AAC20" | ||
|
||
# OpenCTI initialization | ||
opencti_api_client = OpenCTIApiClient(api_url, api_token) | ||
|
||
process = opencti_api_client.stix_cyber_observable.create( | ||
observableData={ | ||
"type": "Financial-Account", | ||
"account_number": "123-45-9988", | ||
"account_status": "active", | ||
"account_type": "credit_credit_card", | ||
"x_opencti_score": 90, | ||
"iban_number": "55667", | ||
"bic_number": "009998877", | ||
"currency_code": "bahraini_dinar_(bhd)", | ||
} | ||
) | ||
|
||
print(process) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# coding: utf-8 | ||
|
||
from pycti import OpenCTIApiClient | ||
|
||
# Variables | ||
api_url = "http://localhost:4000" | ||
api_token = "6C2C9EAE-6FF5-4421-B118-74A3CA5AAC20" | ||
|
||
# OpenCTI initialization | ||
opencti_api_client = OpenCTIApiClient(api_url, api_token) | ||
|
||
process = opencti_api_client.stix_cyber_observable.create( | ||
observableData={ | ||
"type": "Financial-Asset", | ||
"name": "Joe's Big Boat", | ||
"asset_type": "boat", | ||
"asset_value": 12000000, | ||
"currency_code": "belarusian_ruble_(byr)", | ||
} | ||
) | ||
|
||
print(process) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# coding: utf-8 | ||
from dateutil.parser import parse | ||
|
||
from pycti import OpenCTIApiClient | ||
|
||
# Variables | ||
api_url = "http://localhost:4000" | ||
api_token = "6C2C9EAE-6FF5-4421-B118-74A3CA5AAC20" | ||
|
||
# OpenCTI initialization | ||
opencti_api_client = OpenCTIApiClient(api_url, api_token) | ||
|
||
# Define the date | ||
date = parse("2019-02-06").strftime("%Y-%m-%dT%H:%M:%SZ") | ||
|
||
process = opencti_api_client.stix_cyber_observable.create( | ||
observableData={ | ||
"type": "Financial-Transaction", | ||
"transaction_date": date, | ||
"transaction_value": 62000000, | ||
"currency_code": "belarusian_ruble_(byr)", | ||
} | ||
) | ||
|
||
print(process) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters