Skip to content

Commit

Permalink
Merge pull request #36 from lawndoc/teams-webhook-error
Browse files Browse the repository at this point in the history
Bug fix: new Teams webhook response code raises an error
  • Loading branch information
lawndoc authored Jul 15, 2024
2 parents c52a6e5 + e1cda16 commit ada403a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions utils/teams.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ def send_teams_message(webhook_url, responder_ip):
]
}
response = requests.post(webhook_url, json=json_data, headers=headers)
print(response.status_code)
if response.status_code != 200:
raise TeamsException(response.reason)
if response.status_code != 202:
print(f"[!] ERROR: failed to send teams webhook - {response.status_code} {response.reason}")

if __name__ == "__main__":
with open("respotter.conf", "r") as config_file:
Expand Down

0 comments on commit ada403a

Please sign in to comment.