Skip to content
Open
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
4 changes: 2 additions & 2 deletions sshalert.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ def process_log_entry(logline):
Check a logline and see if it matches the content we care about.
"""
# If it's a local sudo exec
if all(x in logline for x in ["sudo", "COMMAND"]:
if all(x in logline for x in ("sudo", "COMMAND")):
send_sms(logline)

# If it's an SSH login
elif all(x in logline for x in ["ssh", "Accepted"]:
elif all(x in logline for x in ("ssh", "Accepted")):
send_sms(logline)
return

Expand Down