initial version
but working
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
# logfile Country resolver
|
||||
|
||||
## Use like
|
||||
|
||||
```bash
|
||||
cat access_crowdsec.log | stdbuf -o0 grep "/search" | grep -v "Safari/" | stdbuf -o0 /tmp/resolver | stdbuf -o0 egrep "Russia|Belarus|^SA|^AS|^AF" > block_20250227.txt
|
||||
cscli decisions delete --all; cat block_20250227.txt | cut -d"|" -f3 | perl -ne 's/(\d+)\.(\d+)\..*/$1.$2/; print ' | uniq | perl -ne 'chomp;print $_,".0.0/16\n"' | cscli decisions import -i - --format values -d48h -R toomuch_AS_SA_AF
|
||||
|
||||
```
|
||||
|
||||
## packaging
|
||||
`pyinstaller --onefile resolv.py`
|
||||
Reference in New Issue
Block a user