Skip to content

Commit

Permalink
Oops, I missed the config file in all the excitement
Browse files Browse the repository at this point in the history
  • Loading branch information
integgroll committed Jan 28, 2012
1 parent b959178 commit ab90deb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions wharfwhacker.conf
Expand Up @@ -29,6 +29,8 @@ local_ip: 127.0.0.1

### Wow WW you do whack ports really well, do it again.
## I can't baby, I am all whacked out.
### That is a real shame, how many times did we whack before we had to stop?
whack_threshhold: 5



3 changes: 2 additions & 1 deletion wharfwhacker.py
Expand Up @@ -29,6 +29,7 @@ def __init__(self, config_file = "wharfwhacker.conf"):
self.password = attributes['password']
self.secured_ports = attributes['protect_ports'].split(",")
self.safe_ports = attributes['ignore_ports'].split(",")
self.whack_threshhold = int(attributes['whack_threshhold'])
self.ignore_ports = self.secured_ports + self.safe_ports
self.authentication_length = int(attributes['knocks'])
self.start_port = 0
Expand Down Expand Up @@ -140,7 +141,7 @@ def ban_check(self,ip_address):
# Applying the attempts until ban functions
if ip_address in self.ban_list:
self.ban_list[ip_address] = self.ban_list[ip_address] + 1
if self.ban_list >= self.mistake_threshhold:
if self.ban_list >= self.whack_threshhold:
self.ban_ip(ip_address)
else:
self.ban_list[ip_address] = 1
Expand Down

0 comments on commit ab90deb

Please sign in to comment.