khannakshat7 / Elektra

⚡ML powered Electricity Outage prediction⚡
https://elecktra.uc.r.appspot.com
MIT License
41 stars 84 forks source link

Email warning if login fails more than 5 times #206

Closed arpit456jain closed 3 years ago

arpit456jain commented 3 years ago

Let say some one is trying to login in my account and he fails 5 times . So i should get an warning email that someone is trying to login in your account .

arpit456jain commented 3 years ago

@khannakshat7 please assign me this. I think its a really good issue for security purpose

arpit456jain commented 3 years ago

@khannakshat7 can i make a PR for this?

khannakshat7 commented 3 years ago

@arpit456jain How are you planning to develop it? Please come up with a optimistic solution and discuss

arpit456jain commented 3 years ago

@arpit456jain How are you planning to develop it? Please come up with a optimistic solution and discuss

@khannakshat7 I had already done this. I make a dictionary in python and i am checking every time when someone trying to login if it success then no problem. But if it fails i do dict[user] = 1 if it's not present in dictionary and if its present i will do dict[user] += 1. And if this Value increase than 5 i will send email and if user login before it reaches to 5 i will set value to 0

arpit456jain commented 3 years ago

@khannakshat7 if you want more optimization then i can remove that key from dictionary when user login successfully before reaching 5