From e0189ab1de4a37c1887e9dfda6325d1f0cbe319f Mon Sep 17 00:00:00 2001 From: clowwindy Date: Sat, 3 Jan 2015 13:50:08 +0800 Subject: [PATCH] update readme --- utils/README.md | 8 +++++++- utils/autoban.py | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/utils/README.md b/utils/README.md index b30165b..8441748 100644 --- a/utils/README.md +++ b/utils/README.md @@ -8,5 +8,11 @@ Automatically ban IPs that try to brute force crack the server. python autoban.py < /var/log/shadowsocks.log -Use `-c` to specify with how many failure times it should be considered an +Use `-c` to specify with how many failure times it should be considered as an attack. Default is 3. + +To continue watching for the log file: + + nohup tail -f /var/log/shadowsocks.log | python autoban.py >log 2>log & + +Use with caution. Avoid to ban yourself. diff --git a/utils/autoban.py b/utils/autoban.py index 9c81f6e..d04ebbe 100755 --- a/utils/autoban.py +++ b/utils/autoban.py @@ -32,7 +32,7 @@ if __name__ == '__main__': parser = argparse.ArgumentParser(description='See README') parser.add_argument('-c', '--count', default=3, type=int, help='with how many failure times it should be ' - 'considered an attack') + 'considered as an attack') config = parser.parse_args() ips = {} banned = set()