diff --git a/.gitignore b/.gitignore index 462b3ef..49fd7db 100644 --- a/.gitignore +++ b/.gitignore @@ -67,3 +67,4 @@ target/ .idea/ .vscode .env +pyrightconfig.json \ No newline at end of file diff --git a/README.md b/README.md index 5443550..bec4e4c 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Official low-level client for Intel 471's Titan API. It aims at providing common This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.20.0 -- Package version: 1.20.0.13 +- Package version: 1.20.0.14 - Build package: org.openapitools.codegen.languages.PythonLegacyClientCodegen ## Requirements. diff --git a/docs/MarketplaceProductSearchSchemaData.md b/docs/MarketplaceProductSearchSchemaData.md index ab0e37f..834d13a 100644 --- a/docs/MarketplaceProductSearchSchemaData.md +++ b/docs/MarketplaceProductSearchSchemaData.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **availability** | [**MarketplaceProductAvailabilitySchema**](MarketplaceProductAvailabilitySchema.md) | | [optional] **base** | **str** | Base dump name. | [optional] +**bin** | **str** | Credit card BIN. | [optional] **card_holder** | **str** | Credit card holder. | [optional] **card_number** | **str** | Credit card number. | [optional] **card_type** | **str** | Credit card type. | [optional] diff --git a/docs/MarketplaceProductSearchSchemaDataVictim.md b/docs/MarketplaceProductSearchSchemaDataVictim.md index 500a669..aabdc1e 100644 --- a/docs/MarketplaceProductSearchSchemaDataVictim.md +++ b/docs/MarketplaceProductSearchSchemaDataVictim.md @@ -4,11 +4,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**city** | **str** | | [optional] **country** | **str** | ISO code of country. | [optional] **dob** | **bool** | Availability of dob info. | [optional] **ip_address** | **str** | Ip address. | [optional] **os** | **str** | Operating system. | [optional] **pin** | **bool** | Availability of pin info. | [optional] +**ssn** | **bool** | | [optional] +**state** | **str** | | [optional] +**zip** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/setup.py b/setup.py index 5da095b..04ff464 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ Official low-level client for Intel 471's Titan API. It aims at providing common ground for all the endpoints in Python. - The version of the OpenAPI document: 1.20.0.13 + The version of the OpenAPI document: 1.20.0.14 Generated by: https://openapi-generator.tech """ @@ -13,7 +13,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "Titan Client" -VERSION = "1.20.0.13" +VERSION = "1.20.0.14" # To install the library, run the following # # python setup.py install diff --git a/test/fixtures/api_responses/MarketplaceProductSearchResponse.json b/test/fixtures/api_responses/MarketplaceProductSearchResponse.json index aaa625d..b97c718 100644 --- a/test/fixtures/api_responses/MarketplaceProductSearchResponse.json +++ b/test/fixtures/api_responses/MarketplaceProductSearchResponse.json @@ -8,6 +8,7 @@ "data": { "availability": "gjmWwSYTMIp", "base": "YZqmcweurJC", + "bin": "1234", "card_holder": null, "card_number": null, "card_type": "RWlJvDtvGA", @@ -26,7 +27,11 @@ "dob": null, "ip_address": null, "os": "linux", - "pin": null + "pin": null, + "zip": "1234", + "ssn": false, + "city": null, + "state": null }, "installed_at": 736031477000, "stolen_by_form_stealers": 0, diff --git a/test/fixtures/api_responses/MarketplaceProductStreamResponse.json b/test/fixtures/api_responses/MarketplaceProductStreamResponse.json index e058755..b4d631b 100644 --- a/test/fixtures/api_responses/MarketplaceProductStreamResponse.json +++ b/test/fixtures/api_responses/MarketplaceProductStreamResponse.json @@ -9,6 +9,7 @@ "data": { "availability": "nnvZNviaXWQXNHzZ", "base": "ZKhUtxNrrDmQAcf", + "bin": "1234", "card_holder": "ciADxntTZMAmPmkeLtG", "card_number": null, "card_type": null, @@ -27,7 +28,11 @@ "dob": null, "ip_address": null, "os": "linux", - "pin": null + "pin": null, + "zip": "1234", + "ssn": false, + "city": null, + "state": null }, "installed_at": 736031477000, "stolen_by_form_stealers": 0, diff --git a/titan_client/__init__.py b/titan_client/__init__.py index 3132028..0fecb36 100644 --- a/titan_client/__init__.py +++ b/titan_client/__init__.py @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "1.20.0.13" +__version__ = "1.20.0.14" # import apis into sdk package from titan_client.api.actors_api import ActorsApi diff --git a/titan_client/api_client.py b/titan_client/api_client.py index bf4a41c..2afd616 100644 --- a/titan_client/api_client.py +++ b/titan_client/api_client.py @@ -78,7 +78,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.20.0.13/python' + self.user_agent = 'OpenAPI-Generator/1.20.0.14/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/titan_client/configuration.py b/titan_client/configuration.py index 3e203f9..a1f8340 100644 --- a/titan_client/configuration.py +++ b/titan_client/configuration.py @@ -409,7 +409,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 1.20.0\n"\ - "SDK Package Version: 1.20.0.13".\ + "SDK Package Version: 1.20.0.14".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/titan_client/models/marketplace_product_search_schema_data.py b/titan_client/models/marketplace_product_search_schema_data.py index b39ad3d..89fe495 100644 --- a/titan_client/models/marketplace_product_search_schema_data.py +++ b/titan_client/models/marketplace_product_search_schema_data.py @@ -40,6 +40,7 @@ class MarketplaceProductSearchSchemaData(object): openapi_types = { 'availability': 'MarketplaceProductAvailabilitySchema', 'base': 'str', + 'bin': 'str', 'card_holder': 'str', 'card_number': 'str', 'card_type': 'str', @@ -60,6 +61,7 @@ class MarketplaceProductSearchSchemaData(object): attribute_map = { 'availability': 'availability', 'base': 'base', + 'bin': 'bin', 'card_holder': 'card_holder', 'card_number': 'card_number', 'card_type': 'card_type', @@ -77,7 +79,7 @@ class MarketplaceProductSearchSchemaData(object): 'victim': 'victim' } - def __init__(self, availability=None, base=None, card_holder=None, card_number=None, card_type=None, categories=None, cvv=None, description=None, expiration=None, installed_at=None, issuer=None, marketplace=None, obfuscated_number=None, product_type=None, stolen_by_form_stealers=None, title=None, victim=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, availability=None, base=None, bin=None, card_holder=None, card_number=None, card_type=None, categories=None, cvv=None, description=None, expiration=None, installed_at=None, issuer=None, marketplace=None, obfuscated_number=None, product_type=None, stolen_by_form_stealers=None, title=None, victim=None, local_vars_configuration=None): # noqa: E501 """MarketplaceProductSearchSchemaData - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() @@ -85,6 +87,7 @@ def __init__(self, availability=None, base=None, card_holder=None, card_number=N self._availability = None self._base = None + self._bin = None self._card_holder = None self._card_number = None self._card_type = None @@ -106,6 +109,8 @@ def __init__(self, availability=None, base=None, card_holder=None, card_number=N self.availability = availability if base is not None: self.base = base + if bin is not None: + self.bin = bin if card_holder is not None: self.card_holder = card_holder if card_number is not None: @@ -181,6 +186,29 @@ def base(self, base): self._base = base + @property + def bin(self): + """Gets the bin of this MarketplaceProductSearchSchemaData. # noqa: E501 + + Credit card BIN. # noqa: E501 + + :return: The bin of this MarketplaceProductSearchSchemaData. # noqa: E501 + :rtype: str + """ + return self._bin + + @bin.setter + def bin(self, bin): + """Sets the bin of this MarketplaceProductSearchSchemaData. + + Credit card BIN. # noqa: E501 + + :param bin: The bin of this MarketplaceProductSearchSchemaData. # noqa: E501 + :type bin: str + """ + + self._bin = bin + @property def card_holder(self): """Gets the card_holder of this MarketplaceProductSearchSchemaData. # noqa: E501 diff --git a/titan_client/models/marketplace_product_search_schema_data_victim.py b/titan_client/models/marketplace_product_search_schema_data_victim.py index 0b91be8..875bfbc 100644 --- a/titan_client/models/marketplace_product_search_schema_data_victim.py +++ b/titan_client/models/marketplace_product_search_schema_data_victim.py @@ -38,34 +38,48 @@ class MarketplaceProductSearchSchemaDataVictim(object): and the value is json key in definition. """ openapi_types = { + 'city': 'str', 'country': 'str', 'dob': 'bool', 'ip_address': 'str', 'os': 'str', - 'pin': 'bool' + 'pin': 'bool', + 'ssn': 'bool', + 'state': 'str', + 'zip': 'str' } attribute_map = { + 'city': 'city', 'country': 'country', 'dob': 'dob', 'ip_address': 'ip_address', 'os': 'os', - 'pin': 'pin' + 'pin': 'pin', + 'ssn': 'ssn', + 'state': 'state', + 'zip': 'zip' } - def __init__(self, country=None, dob=None, ip_address=None, os=None, pin=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, city=None, country=None, dob=None, ip_address=None, os=None, pin=None, ssn=None, state=None, zip=None, local_vars_configuration=None): # noqa: E501 """MarketplaceProductSearchSchemaDataVictim - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration + self._city = None self._country = None self._dob = None self._ip_address = None self._os = None self._pin = None + self._ssn = None + self._state = None + self._zip = None self.discriminator = None + if city is not None: + self.city = city if country is not None: self.country = country if dob is not None: @@ -76,6 +90,33 @@ def __init__(self, country=None, dob=None, ip_address=None, os=None, pin=None, l self.os = os if pin is not None: self.pin = pin + if ssn is not None: + self.ssn = ssn + if state is not None: + self.state = state + if zip is not None: + self.zip = zip + + @property + def city(self): + """Gets the city of this MarketplaceProductSearchSchemaDataVictim. # noqa: E501 + + + :return: The city of this MarketplaceProductSearchSchemaDataVictim. # noqa: E501 + :rtype: str + """ + return self._city + + @city.setter + def city(self, city): + """Sets the city of this MarketplaceProductSearchSchemaDataVictim. + + + :param city: The city of this MarketplaceProductSearchSchemaDataVictim. # noqa: E501 + :type city: str + """ + + self._city = city @property def country(self): @@ -192,6 +233,69 @@ def pin(self, pin): self._pin = pin + @property + def ssn(self): + """Gets the ssn of this MarketplaceProductSearchSchemaDataVictim. # noqa: E501 + + + :return: The ssn of this MarketplaceProductSearchSchemaDataVictim. # noqa: E501 + :rtype: bool + """ + return self._ssn + + @ssn.setter + def ssn(self, ssn): + """Sets the ssn of this MarketplaceProductSearchSchemaDataVictim. + + + :param ssn: The ssn of this MarketplaceProductSearchSchemaDataVictim. # noqa: E501 + :type ssn: bool + """ + + self._ssn = ssn + + @property + def state(self): + """Gets the state of this MarketplaceProductSearchSchemaDataVictim. # noqa: E501 + + + :return: The state of this MarketplaceProductSearchSchemaDataVictim. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this MarketplaceProductSearchSchemaDataVictim. + + + :param state: The state of this MarketplaceProductSearchSchemaDataVictim. # noqa: E501 + :type state: str + """ + + self._state = state + + @property + def zip(self): + """Gets the zip of this MarketplaceProductSearchSchemaDataVictim. # noqa: E501 + + + :return: The zip of this MarketplaceProductSearchSchemaDataVictim. # noqa: E501 + :rtype: str + """ + return self._zip + + @zip.setter + def zip(self, zip): + """Sets the zip of this MarketplaceProductSearchSchemaDataVictim. + + + :param zip: The zip of this MarketplaceProductSearchSchemaDataVictim. # noqa: E501 + :type zip: str + """ + + self._zip = zip + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/titan_client/titan_stix/mappers/reports.py b/titan_client/titan_stix/mappers/reports.py index bcfe869..8a52366 100644 --- a/titan_client/titan_stix/mappers/reports.py +++ b/titan_client/titan_stix/mappers/reports.py @@ -216,6 +216,8 @@ def _map_report(self, source: dict, object_refs: StixObjects = None) -> StixObje stix_objects = StixObjects([MARKING, author_identity]) stix_objects.extend(object_refs.get()) name = self._get_title(source) + if not name: + name = f"{report_type.value} {source['uid']}" time_published = self._format_published(self._get_released_at(source)) report_types = [report_type.value] labels = self._get_malware_families_names(stix_objects)