Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
routersploit
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
czos-dpend
routersploit
Commits
d61c41b2
Unverified
Commit
d61c41b2
authored
Apr 09, 2024
by
Anuj Koli
Committed by
GitHub
Apr 09, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolved issue with exploit (#766) (#767)
parent
ba839fdd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
apiros_client.py
routersploit/libs/apiros/apiros_client.py
+1
-1
api_ros_default_creds.py
...t/modules/creds/routers/mikrotik/api_ros_default_creds.py
+4
-1
No files found.
routersploit/libs/apiros/apiros_client.py
View file @
d61c41b2
...
@@ -145,7 +145,7 @@ class ApiRosClient(object):
...
@@ -145,7 +145,7 @@ class ApiRosClient(object):
ret
=
''
ret
=
''
while
len
(
ret
)
<
length
:
while
len
(
ret
)
<
length
:
s
=
self
.
sk
.
recv
(
length
-
len
(
ret
))
s
=
self
.
sk
.
recv
(
length
-
len
(
ret
))
if
s
==
''
:
if
s
is
None
or
s
==
''
:
raise
RuntimeError
(
"connection closed by remote end"
)
raise
RuntimeError
(
"connection closed by remote end"
)
ret
+=
s
.
decode
(
'UTF-8'
,
'replace'
)
ret
+=
s
.
decode
(
'UTF-8'
,
'replace'
)
...
...
routersploit/modules/creds/routers/mikrotik/api_ros_default_creds.py
View file @
d61c41b2
...
@@ -51,7 +51,7 @@ class Exploit(TCPClient):
...
@@ -51,7 +51,7 @@ class Exploit(TCPClient):
tcp_client
=
self
.
tcp_create
()
tcp_client
=
self
.
tcp_create
()
tcp_sock
=
tcp_client
.
connect
()
tcp_sock
=
tcp_client
.
connect
()
apiros
=
ApiRosClient
(
tcp_
sock
)
apiros
=
ApiRosClient
(
tcp_
client
)
output
=
apiros
.
login
(
username
,
password
)
output
=
apiros
.
login
(
username
,
password
)
...
@@ -65,6 +65,9 @@ class Exploit(TCPClient):
...
@@ -65,6 +65,9 @@ class Exploit(TCPClient):
print_error
(
"Authentication Failed - Username: '{}' Password: '{}'"
.
format
(
username
,
password
),
verbose
=
self
.
verbosity
)
print_error
(
"Authentication Failed - Username: '{}' Password: '{}'"
.
format
(
username
,
password
),
verbose
=
self
.
verbosity
)
tcp_client
.
close
()
tcp_client
.
close
()
except
RuntimeError
:
print_error
(
"Connection closed by remote end"
)
except
StopIteration
:
except
StopIteration
:
break
break
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment