This commit is contained in:
Mariusz B. / mgeeky 2021-10-27 03:46:08 +02:00
parent 93b1040fe7
commit bb6a83a303
2 changed files with 8 additions and 1 deletions

View File

@ -1,7 +1,7 @@
## Phishing and Social-Engineering related scripts, tools and CheatSheets ## Phishing and Social-Engineering related scripts, tools and CheatSheets
- **`decode-spam-headers.py`** - This tool accepts on input an `*.EML` or `*.txt` file with all the SMTP headers. It will then extract a subset of interesting headers and using **37+** tests will attempt to decode them as much as possible. - **`decode-spam-headers.py`** - This tool accepts on input an `*.EML` or `*.txt` file with all the SMTP headers. It will then extract a subset of interesting headers and using **79+** tests will attempt to decode them as much as possible.
This script also extracts all IPv4 addresses and domain names and performs full DNS resolution of them. This script also extracts all IPv4 addresses and domain names and performs full DNS resolution of them.

View File

@ -1233,8 +1233,11 @@ Results will be unsound. Make sure you have pasted your headers with correct spa
('Header Containing Client IP', self.testAnyOtherIP), ('Header Containing Client IP', self.testAnyOtherIP),
) )
testsConducted = 0
for testName, testFunc in tests: for testName, testFunc in tests:
try: try:
testsConducted += 1
self.logger.dbg(f'Running "{testName}"...') self.logger.dbg(f'Running "{testName}"...')
self.results[testName] = testFunc() self.results[testName] = testFunc()
@ -1253,6 +1256,7 @@ Results will be unsound. Make sure you have pasted your headers with correct spa
if self.decode_all: if self.decode_all:
for testName, testFunc in testsDecodeAll: for testName, testFunc in testsDecodeAll:
try: try:
testsConducted += 1
self.logger.dbg(f'Running "{testName}"...') self.logger.dbg(f'Running "{testName}"...')
self.results[testName] = testFunc() self.results[testName] = testFunc()
@ -1270,6 +1274,7 @@ Results will be unsound. Make sure you have pasted your headers with correct spa
for testName, testFunc in testsReturningArray: for testName, testFunc in testsReturningArray:
try: try:
testsConducted += 1
self.logger.dbg(f'Running "{testName}"...') self.logger.dbg(f'Running "{testName}"...')
outs = testFunc() outs = testFunc()
@ -1305,6 +1310,8 @@ Results will be unsound. Make sure you have pasted your headers with correct spa
self.logger.dbg('\n------------------------------------------\n\n') self.logger.dbg('\n------------------------------------------\n\n')
self.logger.dbg(f'Conducted {testsConducted} tests on provided SMTP headers.')
return {k: v for k, v in self.results.items() if v} return {k: v for k, v in self.results.items() if v}
@staticmethod @staticmethod