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
581acc64
Unverified
Commit
581acc64
authored
6 years ago
by
Marcin Bury
Committed by
GitHub
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding tests for D-Link DSL-2780B & DSL-2730B & DSL-526B DNS Change module (#533)
parent
219d86c3
master
…
v3.4.4
v3.4.3
v3.4.2
v3.4.0
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
test_dsl_2730b_2780b_526b_dns_change.py
...its/routers/dlink/test_dsl_2730b_2780b_526b_dns_change.py
+23
-0
No files found.
tests/exploits/routers/dlink/test_dsl_2730b_2780b_526b_dns_change.py
0 → 100644
View file @
581acc64
from
routersploit.modules.exploits.routers.dlink.dsl_2730b_2780b_526b_dns_change
import
Exploit
def
test_check_success
(
target
):
""" Test scenario - successful exploitation """
route_mock
=
target
.
get_route_mock
(
"/dnscfg.cgi"
,
methods
=
[
"POST"
])
route_mock
.
return_value
=
(
"TEST"
)
exploit
=
Exploit
()
assert
exploit
.
target
==
""
assert
exploit
.
port
==
80
assert
exploit
.
dns1
==
"8.8.8.8"
assert
exploit
.
dns2
==
"8.8.4.4"
exploit
.
target
=
target
.
host
exploit
.
port
=
target
.
port
assert
exploit
.
check
()
is
None
assert
exploit
.
run
()
is
None
This diff is collapsed.
Click to expand it.
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