Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brazilianian/abuse ssl/remove unused variable #3203

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions external-import/abuse-ssl/src/abuse-ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ def __init__(self):
)
* 60
)
self.update_existing_data = get_config_variable(
"CONNECTOR_UPDATE_EXISTING_DATA",
["connector", "update_existing_data"],
config,
)

def run(self):
"""Running component of class"""
Expand Down Expand Up @@ -200,7 +195,9 @@ def create_relationships(self, observables, indicators):
def create_bundle(self, observables, indicators, relationships):
"""Creates serialized STIX Bundle object from the provided lists of STIX Observables, Indicators, and Relationships

:param observables: List of STIX Observables objects
:param indicators: List of STIX Indicator objects
:param relationships: List of STIX Relationship objects
:return: Serialized STIX Bundle object
"""
self.helper.log_info("Creating STIX Bundle")
Expand All @@ -219,18 +216,15 @@ def send_bundle(self, bundle, work_id):
Attempts to send serialized STIX Bundle to OpenCTI client

:param bundle: Serialized STIX Bundle
:param work_id: a valid work id
"""
self.helper.log_info("Sending STIX Bundle")
try:
self.helper.send_stix2_bundle(
bundle, work_id=work_id, update=self.update_existing_data
)
self.helper.send_stix2_bundle(bundle, work_id=work_id)
except:
time.sleep(60)
try:
self.helper.send_stix2_bundle(
bundle, work_id=work_id, update=self.update_existing_data
)
self.helper.send_stix2_bundle(bundle, work_id=work_id)
except Exception as e:
self.helper.log_error(str(e))

Expand Down