update
This commit is contained in:
parent
d0b7dfd96a
commit
b7666ac94f
|
@ -24,6 +24,7 @@ import json
|
||||||
import textwrap
|
import textwrap
|
||||||
import socket
|
import socket
|
||||||
import time
|
import time
|
||||||
|
import base64
|
||||||
import packaging.version
|
import packaging.version
|
||||||
|
|
||||||
from dateutil import parser
|
from dateutil import parser
|
||||||
|
@ -867,7 +868,7 @@ Results will be unsound. Make sure you have pasted your headers with correct spa
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def printable(input_str):
|
def printable(input_str):
|
||||||
return all(ord(c) < 127 and c in string.printable for c in input_str)
|
return all(c < 127 and chr(c) in string.printable for c in input_str)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def extractDomain(fqdn):
|
def extractDomain(fqdn):
|
||||||
|
@ -882,12 +883,14 @@ Results will be unsound. Make sure you have pasted your headers with correct spa
|
||||||
if num == -1: return []
|
if num == -1: return []
|
||||||
|
|
||||||
parts = value.split('|')
|
parts = value.split('|')
|
||||||
|
result = ''
|
||||||
|
|
||||||
for p in parts:
|
for p in parts:
|
||||||
if p.startswith('eyJ'):
|
if p.startswith('eyJ'):
|
||||||
decoded = base64.b64decode(p)
|
decoded = base64.b64decode(p)
|
||||||
if SMTPHeadersAnalysis.printable(decoded):
|
if SMTPHeadersAnalysis.printable(decoded):
|
||||||
result += f'\t- Headers contained Feedback Loop object used by marketing systems to offer ISPs way to notify the sender that recipient marked that e-mail as Junk/Spam.\n'
|
result += f'\t- Headers contained Feedback Loop object used by marketing systems to offer ISPs way to notify the sender that recipient marked that e-mail as Junk/Spam.\n'
|
||||||
result += json.dumps(json.loads(decoded), indent=4) + '\n'
|
result += '\n' + json.dumps(json.loads(decoded), indent=4) + '\n'
|
||||||
|
|
||||||
if len(result) == 0:
|
if len(result) == 0:
|
||||||
return []
|
return []
|
||||||
|
|
Loading…
Reference in New Issue