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
cdbb42ce
Commit
cdbb42ce
authored
Jun 25, 2016
by
fwkz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing tests after setg/unsetg changes
parent
4e37bb36
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
test_completer.py
routersploit/test/test_completer.py
+15
-4
test_interpreter.py
routersploit/test/test_interpreter.py
+1
-1
No files found.
routersploit/test/test_completer.py
View file @
cdbb42ce
...
...
@@ -89,7 +89,7 @@ class RoutersploitCompleterTest(RoutersploitTestCase):
self
.
set_module
()
self
.
rsf
.
send
(
"
\t\t
"
)
self
.
assertPrompt
(
'back check exec exit help run set show
\r\n
'
,
'back check exec exit help run set s
etg s
how
\r\n
'
,
self
.
module_prompt
(
'FTP Bruteforce'
)
)
...
...
@@ -121,18 +121,29 @@ class RoutersploitCompleterTest(RoutersploitTestCase):
self
.
set_module
()
self
.
rsf
.
send
(
"s
\t\t
"
)
self
.
assertPrompt
(
'set show
\r\n
'
,
'set s
etg s
how
\r\n
'
,
self
.
module_prompt
(
'FTP Bruteforce'
)
)
def
test_complete_set_raw_2
(
self
):
self
.
set_module
()
self
.
rsf
.
send
(
"se
\t
\t
"
)
self
.
rsf
.
send
(
"se
\t
"
)
self
.
assertPrompt
(
self
.
module_prompt
(
'FTP Bruteforce'
),
'se
t
'
,
'se
\a
t
'
,
)
def
test_complete_set_raw_3
(
self
):
self
.
set_module
()
self
.
rsf
.
send
(
"set
\t\t
"
)
self
.
assertPrompt
(
'set setg
\r\n
'
,
self
.
module_prompt
(
'FTP Bruteforce'
),
)
def
test_complete_setg
(
self
):
# TODO: cover setg/unsetg
pass
def
test_complete_set
(
self
):
self
.
set_module
()
self
.
rsf
.
send
(
"set
\t\t
"
)
...
...
routersploit/test/test_interpreter.py
View file @
cdbb42ce
...
...
@@ -187,7 +187,7 @@ class RoutersploitInterpreterTest(RoutersploitTestCase):
def
test_suggested_commands_with_loaded_module
(
self
):
self
.
assertEqual
(
self
.
interpreter
.
suggested_commands
(),
[
'run'
,
'back'
,
'set '
,
's
how '
,
'check'
,
'exec
'
,
'help'
,
'exit'
]
# Extra space at the end because of following param
[
'run'
,
'back'
,
'set '
,
's
etg '
,
'show '
,
'check'
,
'exec
'
,
'help'
,
'exit'
]
# Extra space at the end because of following param
)
def
test_suggested_commands_without_loaded_module
(
self
):
...
...
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