Closed sparrow-k closed 3 years ago
Hi @sparrow-k, this issue has been resolved on the cti-python-stix2 repo. The reason why you see this behavior happen in the TAXIICollectionSource
and not the FileSystemSource
is because each DataStore class implements their own methods for the abstract class they subclass. You can read a bit more about it in the issue referenced below. I will be closing this since the fix is already present on master and will be available in the next release.
I should note for awareness that the client also implements a similar .get() method. Since you opened the issue on the client repo :)
from taxii2client.v20 import Collection # only specify v20 if your installed version is >= 2.0.0
collections = {
"enterprise_attack": "95ecc380-afe9-11e4-9b6c-751b66dd541e",
"pre_attack": "062767bd-02d2-4b72-84ba-56caef0f8658",
"mobile_attack": "2f669986-b40b-4423-b720-4396ca6a462b"
}
collection = Collection(f"https://cti-taxii.mitre.org/stix/collections/{collections['enterprise_attack']}/")
collection.get_object("x-mitre-tactic--ffd5bcee-6e16-4dd2-8eca-7b3beedf33ca")
duplicate oasis-open/cti-python-stix2#459
Hello! I am trying to pull data from the ATT&CK TAXII server, and I'm following the recipe code from their github: https://github.com/mitre/cti/blob/master/USAGE.md#access-from-the-attck-taxii-server
This is the code I'm running:
But I'm getting this error:
When I'm trying to use a local filesystem, it works fine. IE:
Is this a bug or am I missing something? Thanks :)