Skip to content

Commit

Permalink
reduces bad proxies amount
Browse files Browse the repository at this point in the history
  • Loading branch information
Bitwise-01 committed Jan 17, 2019
1 parent 3693887 commit ff4cdbc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions lib/bruter.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ def browser_manager(self):
if browser.start_time:
if time() - browser.start_time >= max_time_to_wait:
browser.is_active = False

with self.lock:
self.proxy_manager.bad_proxy(browser.proxy)


def remove_browser(self, browser):
if browser in self.browsers:
with self.lock:
Expand Down Expand Up @@ -164,7 +161,7 @@ def start(self):
sleep(1.5)
continue

for browser in self.browsers:
for browser in self.browsers:

self.display.stats(browser.password, self.password_manager.attempts, len(self.browsers))
last_attempt = self.password_manager.attempts
Expand Down
4 changes: 2 additions & 2 deletions lib/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
response_codes = { 'succeed': 0, 'failed': 1, 'locked': -1 }

# Limits
max_bad_proxies = 256
max_time_to_wait = 10
max_bad_proxies = 128
max_time_to_wait = 25
max_bots_per_proxy = 16

# Misc
Expand Down

0 comments on commit ff4cdbc

Please sign in to comment.