Skip to content

Commit

Permalink
Further tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkst-quinn committed Feb 14, 2025
1 parent d58c3de commit 68e4a66
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions canarytokens/channel_output_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,10 +444,7 @@ def format_report_intro(details: TokenAlertDetails):
else:
intro = f"{article} {readable_type} Canarytoken has been triggered."

if (
"src_port" in details.additional_data
and details.additional_data["src_port"]
):
if "src_port" in details.additional_data:
intro = dedent(f"from Source Port {details.additional_data['src_port']}")

if details.channel == "DNS": # TODO: make channel an enum.
Expand Down
1 change: 0 additions & 1 deletion canarytokens/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2266,7 +2266,6 @@ class TokenAlertDetails(BaseModel):
channel: str = "DNS"
token_type: TokenTypes = TokenTypes.DNS
src_ip: Optional[str] = "127.0.0.1"
src_port: Optional[int] = 1
src_data: Optional[dict[str, Any]] = None
token: str = "default_token_for_v2"

Expand Down

0 comments on commit 68e4a66

Please sign in to comment.