36 lines
1.2 KiB
YAML
Executable File

###################################
## Uses IFTTT to notify me of bad logins.
###################################
- alias: Login Failure
id: 814c48ea-e2e1-4b75-92b0-581081af5ce5
trigger:
platform: template
value_template: "{{ states('persistent_notification.httplogin') != 'unknown' }}"
action:
- service: script.notify_engine
data:
value1: 'Bad Login: '
value2: 'There was a Hack attempt!'
value3: 'Go Check the GUI for details.'
who: 'carlo'
apns_id: 'information'
- service: script.tweet_engine_image
data:
tweet: >
{{ [
"Seriously, I am a Smart Home. I am logging your hack attempt.",
"If you do not know the password, you get locked out and IP banned.",
"Three Strikes and you are OUT! IP Banned.",
"Live tweeting a bad login, right before I ban that IP address FOREVER."
] | random + "#Security"}}
image: >-
{{ [
"/config/www/custom_ui/floorplan/images/branding/security_lock.png",
"/config/www/custom_ui/floorplan/images/branding/locked_out.png",
"/config/www/custom_ui/floorplan/images/branding/A_GRADE.png"
] | random }}