Skip to content

Commit

Permalink
Optimizing performance of creds/http_basic_default
Browse files Browse the repository at this point in the history
  • Loading branch information
fwkz committed Aug 16, 2016
1 parent 9e2ed38 commit 66bdaef
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions routersploit/modules/creds/http_basic_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def attack(self):
with ThreadPoolExecutor(self.threads) as executor:
for record in defaults:
username, password = record.split(':')
executor.submit(self.target_function, username, password)
executor.submit(self.target_function, url, username, password)

if self.credentials:
print_success("Credentials found!")
Expand All @@ -81,9 +81,8 @@ def attack(self):

defaults.close()

def target_function(self, user, password):
def target_function(self, url, user, password):
name = threading.current_thread().name
url = "{}:{}{}".format(self.target, self.port, self.path)

user = user.encode('utf-8').strip()
password = password.encode('utf-8').strip()
Expand Down

0 comments on commit 66bdaef

Please sign in to comment.