mirror of https://github.com/MISP/mail_to_misp
fake_smtp integration modified (-r) for larger files
parent
98d0145af3
commit
a59863ced9
|
@ -59,6 +59,14 @@ mail_subject = ""
|
|||
#if not sys.stdin.isatty():
|
||||
if len(sys.argv) == 1:
|
||||
mailcontent = sys.stdin.buffer.read().decode("utf-8", "ignore")
|
||||
else:
|
||||
# read from tempfile
|
||||
if sys.argv[1] == "-r":
|
||||
tempfilename = sys.argv[2]
|
||||
tf = open(tempfilename, 'r')
|
||||
mailcontent = tf.read()
|
||||
tf.close()
|
||||
# receive data and subject through arguments
|
||||
else:
|
||||
mailcontent = sys.argv[1]
|
||||
syslog.syslog(mailcontent)
|
||||
|
|
Loading…
Reference in New Issue