Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printing style changed #13

Merged
merged 1 commit into from
Dec 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions email-analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,42 +164,42 @@ def get_attachments(filename : str):
headers = get_headers(data)
# Print Headers
get_headers_banner() # Print Banner
print("_"*TER_COL_SIZE)
for key,val in headers.items():
print("_"*TER_COL_SIZE)
print(key+":")
print(val)
print("_"*TER_COL_SIZE)

# If Investigation requested
if args.investigate:
get_investigation_banner() # Print Banner
for key,val in headers.items():
if key == "X-Sender-IP":
print("_"*TER_COL_SIZE)
print("["+key+"]")
print("[Virustotal]")
print("https://www.virustotal.com/gui/search/"+val)
print("[Abuseipdb]")
print("https://www.abuseipdb.com/check/"+val)
print("_"*TER_COL_SIZE)
if headers["X-Sender-IP"]:
print("_"*TER_COL_SIZE)
print("[X-Sender-IP] -> ["+headers["X-Sender-IP"]+"]")
print("[Virustotal]")
print("https://www.virustotal.com/gui/search/"+headers["X-Sender-IP"])
print("[Abuseipdb]")
print("https://www.abuseipdb.com/check/"+headers["X-Sender-IP"])
print("_"*TER_COL_SIZE)


# Digests
if args.digests:
# Get & Print Digests
digests = get_digests(data,filename)
# Print digests
get_digests_banner() # Print Banner
print("_"*TER_COL_SIZE)
for key,val in digests.items():
print("_"*TER_COL_SIZE)
print(key+":")
print(val)
print("_"*TER_COL_SIZE)

# If Investigation requested
if args.investigate:
get_investigation_banner() # Print Banner
print("_"*TER_COL_SIZE)
for key,val in digests.items():
print("_"*TER_COL_SIZE)
print("["+key+"]")
print("[Virustotal]")
print("https://www.virustotal.com/gui/search/"+val)
Expand All @@ -217,10 +217,10 @@ def get_attachments(filename : str):
if args.investigate:
get_investigation_banner() # Print Banner
# Print Links with Investigation tools
print("_"*TER_COL_SIZE)
for index,link in enumerate(links,start=1):
if "://" in link:
link = link.split("://")[-1]
print("_"*TER_COL_SIZE)
print("["+str(index)+"]")
print("[VirusTotal]:")
print("https://www.virustotal.com/gui/search/"+link)
Expand All @@ -243,8 +243,8 @@ def get_attachments(filename : str):
# If Investigation requested
if args.investigate:
get_investigation_banner() # Print Banner
print("_"*TER_COL_SIZE)
for index,attachment in enumerate(attachments,start=1):
print("_"*TER_COL_SIZE)
print("["+str(index)+"]->"+attachment["filename"])
print("[Virustotal]")
print("[md5]->https://www.virustotal.com/gui/search/"+attachment["md5"])
Expand Down