From f0bf834130eb9903cee0aa9eea5e2f771c926de7 Mon Sep 17 00:00:00 2001 From: "Mariusz B. / mgeeky" Date: Mon, 18 Oct 2021 17:37:12 +0200 Subject: [PATCH] enhanced decode-spam-headers.py --- phishing/decode-spam-headers.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/phishing/decode-spam-headers.py b/phishing/decode-spam-headers.py index 2dfff85..beadc86 100644 --- a/phishing/decode-spam-headers.py +++ b/phishing/decode-spam-headers.py @@ -53,13 +53,20 @@ import textwrap import socket import time import base64 -import packaging.version from dateutil import parser from email import header as emailheader from datetime import * from dateutil.tz import * +try: + import packaging.version + +except ImportError: + print(''' +[!] You need to install packaging: + # pip3 install packaging +''') try: import dns.resolver @@ -2521,7 +2528,7 @@ def opts(argv): args = o.parse_args() - if len(args.outfile) > 0: + if len(args.outfile) > 0 or args.format == 'json': args.nocolor = True options.update(vars(args))