mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-08-19 13:43:20 +00:00
Fix splunk HEC submission and --outgoing-ssl option
Changed --outgoing-SSL to --outgoing-ssl
This commit is contained in:
+1
-1
@@ -125,7 +125,7 @@ CLI help
|
||||
Email the results using this password
|
||||
--outgoing-port OUTGOING_PORT
|
||||
Email the results using this port
|
||||
--outgoing-SSL OUTGOING_SSL
|
||||
--outgoing-ssl OUTGOING_SSL
|
||||
Use SSL/TLS instead of STARTTLS (more secure, and
|
||||
required by some providers, like Gmail)
|
||||
-F OUTGOING_FROM, --outgoing-from OUTGOING_FROM
|
||||
|
||||
+1
-1
@@ -106,7 +106,7 @@ CLI help
|
||||
Email the results using this password
|
||||
--outgoing-port OUTGOING_PORT
|
||||
Email the results using this port
|
||||
--outgoing-SSL OUTGOING_SSL
|
||||
--outgoing-ssl OUTGOING_SSL
|
||||
Use SSL/TLS instead of STARTTLS (more secure, and
|
||||
required by some providers, like Gmail)
|
||||
-F OUTGOING_FROM, --outgoing-from OUTGOING_FROM
|
||||
|
||||
+5
-3
@@ -121,7 +121,7 @@ def _main():
|
||||
help="Email the results using this password")
|
||||
arg_parser.add_argument("--outgoing-port",
|
||||
help="Email the results using this port")
|
||||
arg_parser.add_argument("--outgoing-SSL",
|
||||
arg_parser.add_argument("--outgoing-ssl",
|
||||
help="Use SSL/TLS instead of STARTTLS (more "
|
||||
"secure, and required by some providers, "
|
||||
"like Gmail)")
|
||||
@@ -227,7 +227,8 @@ def _main():
|
||||
forensic_reports += reports["forensic_reports"]
|
||||
|
||||
except IMAPError as error:
|
||||
logger.error("IMAP Error: {0}".format(error.__str__()))
|
||||
error_str = error.__str__().replace("b'", "").lstrip("'")
|
||||
logger.error("IMAP Error: {0}".format(error_str))
|
||||
exit(1)
|
||||
|
||||
results = OrderedDict([("aggregate_reports", aggregate_reports),
|
||||
@@ -263,7 +264,8 @@ def _main():
|
||||
test=args.test, nameservers=args.nameservers,
|
||||
dns_timeout=args.timeout)
|
||||
except IMAPError as error:
|
||||
logger.error("IMAP Error: {0}".format(error.__str__()))
|
||||
error_str = error.__str__().replace("b'", "").lstrip("'")
|
||||
logger.error("IMAP Error: {0}".format(error_str))
|
||||
exit(1)
|
||||
|
||||
|
||||
|
||||
@@ -96,9 +96,8 @@ class HECClient(object):
|
||||
data["sourcetype"] = "dmarc:aggregate"
|
||||
data["event"] = new_report.copy()
|
||||
json_str += "{0}\n".format(json.dumps(data))
|
||||
|
||||
try:
|
||||
response = self.session.post(self.url, json=json_str).json()
|
||||
response = self.session.post(self.url, data=json_str).json()
|
||||
except Exception as e:
|
||||
raise SplunkError(e.__str__())
|
||||
if response["code"] != 0:
|
||||
@@ -125,9 +124,8 @@ class HECClient(object):
|
||||
data["sourcetype"] = "dmarc:forensic"
|
||||
data["event"] = report.copy()
|
||||
json_str += "{0}\n".format(json.dumps(data))
|
||||
|
||||
try:
|
||||
response = self.session.post(self.url, json=json_str).json()
|
||||
response = self.session.post(self.url, data=json_str).json()
|
||||
except Exception as e:
|
||||
raise SplunkError(e.__str__())
|
||||
if response["code"] != 0:
|
||||
|
||||
Reference in New Issue
Block a user