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

Update email.py #463

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions ghunt/modules/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ async def hunt(as_client: httpx.AsyncClient, email_address: str, json_file: bool
await ia.detect_face(vision_api, as_client, target.coverPhotos[container].url)
print()

print(f"Last profile edit : {target.sourceIds[container].lastUpdated.strftime('%Y/%m/%d %H:%M:%S (UTC)')}\n")
if target.sourceIds[container].lastUpdated:
print(f"Last profile edit : {target.sourceIds[container].lastUpdated.strftime('%Y/%m/%d %H:%M:%S (UTC)')}\n")
else:
gb.rc.print(f"Last profile edit : [italic]Not found.[/italic]\n")
Copy link
Contributor

@4383 4383 Nov 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why using gb.rc (the rich console) in the else section and not in the if section?
I'd suggest to use one or the other in both sections.

Copy link
Contributor

@4383 4383 Nov 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I see the rich console documentation and the markup langage, so I suppose you used it to display in italic https://rich.readthedocs.io/en/stable/markup.html?highlight=italic#console-markup

Ignore my previous comment, your code LGTM


if container in target.emails:
print(f"Email : {target.emails[container].value}")
Expand Down Expand Up @@ -166,4 +169,4 @@ async def hunt(as_client: httpx.AsyncClient, email_address: str, json_file: bool
f.write(json.dumps(json_results, cls=GHuntEncoder, indent=4))
gb.rc.print(f"\n[+] JSON output wrote to {json_file} !", style="italic")

await as_client.aclose()
await as_client.aclose()