mirror of https://gitlab.com/bashrc2/epicyon
Check for wordpress paths
parent
328eb6cd6e
commit
0bca0d9787
|
|
@ -1,2 +1,2 @@
|
|||
#!/bin/bash
|
||||
journalctl -u epicyon | grep "invalid header\|invalid characters\|leech bounced\|LLM scraper\|suspicious\|bad path"
|
||||
journalctl -u epicyon | grep "invalid header\|invalid characters\|leech bounced\|LLM scraper\|suspicious\|bad path\|not wordpress"
|
||||
|
|
|
|||
5
utils.py
5
utils.py
|
|
@ -3964,6 +3964,7 @@ def check_bad_path(path: str):
|
|||
"""for http GET or POST check that the path looks valid
|
||||
"""
|
||||
path_lower = path.lower()
|
||||
|
||||
bad_strings = ('..', '/.', '%2e%2e', '%252e%252e')
|
||||
|
||||
# allow /.well-known/...
|
||||
|
|
@ -3972,6 +3973,10 @@ def check_bad_path(path: str):
|
|||
path_lower.startswith('/users/.well-known/'):
|
||||
bad_strings = ('..', '%2e%2e', '%252e%252e')
|
||||
|
||||
if path_lower.startswith('/wp-content'):
|
||||
print('WARN: this is not wordpress ' + path)
|
||||
return True
|
||||
|
||||
if string_contains(path_lower, bad_strings):
|
||||
print('WARN: bad path ' + path)
|
||||
return True
|
||||
|
|
|
|||
Loading…
Reference in New Issue