Skip to content

Commit

Permalink
Resolved issue with exploit (threat9#766) (threat9#767)
Browse files Browse the repository at this point in the history
  • Loading branch information
R3dIO authored and GH0st3rs committed Sep 18, 2024
1 parent 32c2acd commit 7f30fe3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion routersploit/libs/apiros/apiros_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def readStr(self, length):
ret = ''
while len(ret) < length:
s = self.sk.recv(length - len(ret))
if s == '':
if s is None or s == '':
raise RuntimeError("connection closed by remote end")

ret += s.decode('UTF-8', 'replace')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def target_function(self, running, creds):

tcp_client = self.tcp_create()
tcp_sock = tcp_client.connect()
apiros = ApiRosClient(tcp_sock)
apiros = ApiRosClient(tcp_client)

output = apiros.login(username, password)

Expand All @@ -65,6 +65,9 @@ def target_function(self, running, creds):
print_error("Authentication Failed - Username: '{}' Password: '{}'".format(username, password), verbose=self.verbosity)

tcp_client.close()

except RuntimeError:
print_error("Connection closed by remote end")

except StopIteration:
break
Expand Down

0 comments on commit 7f30fe3

Please sign in to comment.