Skip to content

Commit

Permalink
Fixing wordlist creds parsing (threat9#609)
Browse files Browse the repository at this point in the history
* Fixing wordlist creds parsing

* Pinning requests package because of URL normalization in new version
  • Loading branch information
lucyoa authored Aug 31, 2019
1 parent e781f49 commit b292f4e
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
future
requests
requests==2.21.0
paramiko
pysnmp==4.4.6
pycryptodome
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
future
requests
requests==2.21.0
paramiko
pysnmp==4.4.6
pycryptodome
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def attack(self):
def target_function(self, running, creds):
while running.is_set():
try:
username, password = creds.next().split(":")
username, password = creds.next().split(":", 1)

data = {
"LOGIN_ACCOUNT": username,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def attack(self):
def target_function(self, running, creds):
while running.is_set():
try:
username, password = creds.next().split(":")
username, password = creds.next().split(":", 1)

data = {
"Auth.Username": username,
Expand Down
2 changes: 1 addition & 1 deletion routersploit/modules/creds/generic/ftp_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def attack(self):
def target_function(self, running, data):
while running.is_set():
try:
username, password = data.next().split(":")
username, password = data.next().split(":", 1)
except StopIteration:
break
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def attack(self):
def target_function(self, running, data):
while running.is_set():
try:
username, password = data.next().split(":")
username, password = data.next().split(":", 1)

if self.auth_type == "digest":
auth = HTTPDigestAuth(username, password)
Expand Down
2 changes: 1 addition & 1 deletion routersploit/modules/creds/generic/ssh_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def attack(self):
def target_function(self, running, data):
while running.is_set():
try:
username, password = data.next().split(":")
username, password = data.next().split(":", 1)
ssh_client = self.ssh_create()
if ssh_client.login(username, password):
if self.stop_on_success:
Expand Down
2 changes: 1 addition & 1 deletion routersploit/modules/creds/generic/telnet_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def attack(self):
def target_function(self, running, data):
while running.is_set():
try:
username, password = data.next().split(":")
username, password = data.next().split(":", 1)
telnet_client = self.telnet_create()
if telnet_client.login(username, password, retries=3):
if self.stop_on_success:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def attack(self):
def target_function(self, running, creds):
while running.is_set():
try:
username, password = creds.next().split(":")
username, password = creds.next().split(":", 1)

tcp_client = self.tcp_create()
tcp_sock = tcp_client.connect()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def attack(self):
print_error("Credentials not found")

def target_function(self, data):
username, password = data.split(":")
username, password = data.split(":", 1)

def check(self):
response = self.http_request(
Expand Down

0 comments on commit b292f4e

Please sign in to comment.