diff --git a/email/1.3.0/requirements.txt b/email/1.3.0/requirements.txt index 659b66ad..00d2a636 100644 --- a/email/1.3.0/requirements.txt +++ b/email/1.3.0/requirements.txt @@ -1,4 +1,4 @@ -requests==2.25.1 +requests==2.32.3 glom==20.11.0 jsonpickle==2.0.0 diff --git a/email/1.3.0/src/app.py b/email/1.3.0/src/app.py index 73ec0241..08232735 100644 --- a/email/1.3.0/src/app.py +++ b/email/1.3.0/src/app.py @@ -164,11 +164,16 @@ def send_email_smtp(self, smtp_host, recipient, subject, body, smtp_port, attach "success": False, "reason": f"Failed to send mail: {e}" } + except Exception as e: + return { + "success": False, + "reason": f"Failed to send mail (2): {e}" + } self.logger.info("Successfully sent email with subject %s to %s" % (subject, recipient)) return { "success": True, - "reason": "Email sent to %s, %s!" %(recipient,cc_emails) if cc_emails else "Email sent to %s!" % recipient, + "reason": "Email sent to %s, %s!" % (recipient, cc_emails) if cc_emails else "Email sent to %s!" % recipient, "attachments": attachment_count } diff --git a/shuffle-tools/1.2.0/src/app.py b/shuffle-tools/1.2.0/src/app.py index 493cac19..e0b2e335 100644 --- a/shuffle-tools/1.2.0/src/app.py +++ b/shuffle-tools/1.2.0/src/app.py @@ -2624,7 +2624,7 @@ def cleanup_ioc_data(self, input_data): def parse_ioc(self, input_string, input_type="all"): - ioc_types = ["domains", "urls", "email_addresses", "ipv4s", "ipv4_cidrs", "md5s", "sha256s", "sha1s", "cves"] + ioc_types = ["domains", "urls", "email_addresses", "ipv4s", "ipv6s", "ipv4_cidrs", "md5s", "sha256s", "sha1s", "cves"] #ioc_types = ["ipv4s"] try: @@ -2652,6 +2652,8 @@ def parse_ioc(self, input_string, input_type="all"): new_input_types.append(item) ioc_types = new_input_types + if len(ioc_types) == 0: + input_type = "all" # Not used for anything after cleanup fixes max_size = 7500000 @@ -2667,6 +2669,7 @@ def parse_ioc(self, input_string, input_type="all"): for key, value in iocs.items(): if input_type != "all": if key not in input_type: + print("Invalid key: %s" % key) continue if len(value) > 0: