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
75ca3425
Commit
75ca3425
authored
8 years ago
by
fwkz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding tests covering unsetg tab completion.
parent
c4e2bc9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
test_completer.py
routersploit/test/test_completer.py
+48
-0
No files found.
routersploit/test/test_completer.py
View file @
75ca3425
...
...
@@ -175,6 +175,54 @@ class RoutersploitCompleterTest(RoutersploitTestCase):
'setg usernames '
,
)
def
test_complete_unsetg
(
self
):
"""
Not present in completion if no global option is set
"""
self
.
set_module
()
self
.
rsf
.
send
(
"
\t\t
"
)
self
.
assertPrompt
(
" check exec exit help run set setg show
\r\n
"
,
self
.
module_prompt
(
'FTP Bruteforce'
),
)
def
test_complete_unsetg_2
(
self
):
"""
Available only when global options is set
"""
self
.
set_module
()
self
.
rsf
.
send
(
"setg target foo
\r\n
"
)
self
.
rsf
.
send
(
"
\t\t
"
)
self
.
assertPrompt
(
" show
\r\n
check exit run setg unsetg
\r\n
"
,
self
.
module_prompt
(
'FTP Bruteforce'
),
)
def
test_complete_unsetg_3
(
self
):
"""
Testing presence of available options
"""
self
.
set_module
()
self
.
rsf
.
send
(
"setg target foo
\r\n
"
)
self
.
rsf
.
send
(
"setg port bar
\r\n
"
)
self
.
rsf
.
send
(
"unsetg
\t\t
"
)
self
.
assertPrompt
(
"port target
\r\n
"
,
self
.
module_prompt
(
'FTP Bruteforce'
),
)
def
test_complete_unsetg_4
(
self
):
"""
Testing presence of available options
"""
self
.
set_module
()
self
.
rsf
.
send
(
"setg target foo
\r\n
"
)
self
.
rsf
.
send
(
"unsetg t
\t\t
"
)
self
.
assertPrompt
(
self
.
module_prompt
(
'FTP Bruteforce'
),
"unsetg target"
)
def
test_complete_show_raw
(
self
):
self
.
set_module
()
self
.
rsf
.
send
(
"sh
\t\t
"
)
...
...
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