mirror of https://github.com/MISP/mail_to_misp
python3 changes
parent
09a4c83772
commit
8992f7557c
|
@ -44,6 +44,7 @@ if debug:
|
||||||
target.write("New debug session opened")
|
target.write("New debug session opened")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
if not sys.stdin.isatty():
|
||||||
email_subject = b'M2M - '
|
email_subject = b'M2M - '
|
||||||
email_data = b''
|
email_data = b''
|
||||||
mailcontent = "".join(sys.stdin)
|
mailcontent = "".join(sys.stdin)
|
||||||
|
@ -62,8 +63,8 @@ except Exception as e:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if not stdin_used:
|
if not stdin_used:
|
||||||
email_data = str(sys.argv[1])
|
email_data = sys.argv[1].encode()
|
||||||
email_subject = str(sys.argv[2])
|
email_subject = sys.argv[2].encode()
|
||||||
except:
|
except:
|
||||||
if debug:
|
if debug:
|
||||||
target.write("FATAL ERROR: Not all required input received")
|
target.write("FATAL ERROR: Not all required input received")
|
||||||
|
|
Loading…
Reference in New Issue