mirror of https://gitlab.com/bashrc2/epicyon
Logging for bad logins
parent
d4692f9566
commit
36c3070245
|
@ -1,2 +1,2 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon -r | grep "Login "
|
||||
journalctl -u epicyon -r | grep "Login \|login attempt\|login param"
|
||||
|
|
|
@ -30,10 +30,12 @@ def html_get_login_credentials(login_params: str,
|
|||
"""
|
||||
if not login_params.startswith('username='):
|
||||
if '&username=' not in login_params:
|
||||
print('WARN: invalid login parameters ' + login_params)
|
||||
return None, None, None
|
||||
# minimum time between login attempts
|
||||
curr_time = int(time.time())
|
||||
if curr_time < last_login_time + 10:
|
||||
print('WARN: login attempt too frequent')
|
||||
return None, None, None
|
||||
if '&' not in login_params:
|
||||
return None, None, None
|
||||
|
|
Loading…
Reference in New Issue