Skip to content

Commit

Permalink
Revert "Do not error when src_data is not present"
Browse files Browse the repository at this point in the history
This reverts commit c7a6099.
  • Loading branch information
thinkst-pieter committed Nov 21, 2024
1 parent 98f5b53 commit 8386dc1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions canarytokens/channel_dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,7 @@ def query(self, query: Query, src_ip: str): # noqa C901
return defer.succeed(self._do_dynamic_response(name=query.name.name))

if canarydrop.type == TokenTypes.WINDOWS_FAKE_FS:
invocation_id = src_data.get("src_data", {}).get(
"windows_fake_fs_invocation_id"
)
invocation_id = src_data["src_data"].get("windows_fake_fs_invocation_id")
if (invocation_id is not None) and any(
hit.src_data.get("windows_fake_fs_invocation_id") == invocation_id
for hit in canarydrop.triggered_details.hits
Expand Down

0 comments on commit 8386dc1

Please sign in to comment.