|
| 1 | + |
| 2 | +import demistomock as demisto |
| 3 | +from CommonServerPython import * |
| 4 | +from CommonServerUserPython import * |
| 5 | + |
1 | 6 | """ IMPORTS """
|
2 | 7 |
|
3 | 8 | import json
|
|
35 | 40 | "add_fields": ["events.cnc.ipv4.asn", "events.cnc.ipv4.countryName", "events.cnc.ipv4.region"],
|
36 | 41 | "add_fields_types": ["asn", "geocountry", "geolocation"]
|
37 | 42 | },
|
38 |
| - { |
39 |
| - "main_field": "events.client.ipv4.ip", |
40 |
| - } |
41 | 43 | ]
|
42 | 44 | },
|
43 | 45 | "compromised/card": {
|
@@ -435,7 +437,7 @@ class Client(BaseClient):
|
435 | 437 | """
|
436 | 438 |
|
437 | 439 | def _create_update_generator(self, collection_name: str, max_requests: int,
|
438 |
| - date_from: str | None = None, seq_update: int | str = None, |
| 440 | + date_from: Optional[str] = None, seq_update: Union[int, str] = None, |
439 | 441 | limit: int = 200) -> Generator:
|
440 | 442 | """
|
441 | 443 | Creates generator of lists with feeds class objects for an update session
|
@@ -837,7 +839,7 @@ def calculate_dbot_score(type_):
|
837 | 839 | return Common.DBotScore(
|
838 | 840 | indicator=value,
|
839 | 841 | indicator_type=type_,
|
840 |
| - integration_name="GIB TI&A", |
| 842 | + integration_name="GIB TI", |
841 | 843 | score=score
|
842 | 844 | )
|
843 | 845 |
|
@@ -1030,13 +1032,16 @@ def fetch_incidents_command(client: Client, last_run: dict, first_fetch_time: st
|
1030 | 1032 | :return: next_run will be last_run in the next fetch-incidents; incidents and indicators will be created in Demisto.
|
1031 | 1033 | """
|
1032 | 1034 | incidents = []
|
1033 |
| - next_run: dict[str, dict[str, int | Any]] = {"last_fetch": {}} |
| 1035 | + next_run: dict[str, dict[str, Union[int, Any]]] = {"last_fetch": {}} |
1034 | 1036 | for collection_name in incident_collections:
|
1035 | 1037 | last_fetch = last_run.get("last_fetch", {}).get(collection_name)
|
1036 | 1038 |
|
1037 | 1039 | portions = client.create_poll_generator(collection_name=collection_name, max_requests=requests_count,
|
1038 | 1040 | last_fetch=last_fetch, first_fetch_time=first_fetch_time)
|
1039 | 1041 | for portion, last_fetch in portions:
|
| 1042 | + last_test = last_fetch |
| 1043 | + for last in last_test: |
| 1044 | + set(last) |
1040 | 1045 | for feed in portion:
|
1041 | 1046 | mapping = MAPPING.get(collection_name, {})
|
1042 | 1047 | if collection_name == "compromised/breached":
|
@@ -1081,7 +1086,7 @@ def fetch_incidents_command(client: Client, last_run: dict, first_fetch_time: st
|
1081 | 1086 | return next_run, incidents
|
1082 | 1087 |
|
1083 | 1088 |
|
1084 |
| -def get_available_collections_command(client: Client, args): |
| 1089 | +def get_available_collections_command(client: Client): |
1085 | 1090 | """
|
1086 | 1091 | Returns list of available collections to context and War Room.
|
1087 | 1092 |
|
|
0 commit comments