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
79ce7316
Commit
79ce7316
authored
Mar 11, 2017
by
fwkz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add autopwn powered dlink scanner. #resolves 207
parent
264c4c64
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
59 deletions
+10
-59
dlink_scan.py
routersploit/modules/scanners/dlink_scan.py
+10
-59
No files found.
routersploit/modules/scanners/dlink_scan.py
100644 → 100755
View file @
79ce7316
from
os
import
listdir
from
os.path
import
isfile
,
join
import
imp
from
__future__
import
absolute_import
from
routersploit
import
(
exploits
,
print_success
,
print_error
,
print_status
,
print_info
)
from
.autopwn
import
Exploit
as
BaseScanner
class
Exploit
(
exploits
.
Exploit
):
class
Exploit
(
BaseScanner
):
"""
D-Link Scanner
Scanner implementation for Dlink vulnerabilities.
"""
__info__
=
{
'name'
:
'D
-L
ink Scanner'
,
'description'
:
'Scanner module for D
-L
ink devices'
,
'name'
:
'D
l
ink Scanner'
,
'description'
:
'Scanner module for D
l
ink devices'
,
'authors'
:
[
'Mar
cin Bury <marcin.bury[at]reverse-shel
l.com>'
,
# routersploit module
'Mar
iusz Kupidura <f4wkes[at]gmai
l.com>'
,
# routersploit module
],
'references'
:
(
''
,
),
'devices'
:
(
'
Multi
'
,
)
'
Dlink
'
,
)
,
}
target
=
exploits
.
Option
(
''
,
'Target IP address e.g. 192.168.1.1'
)
# target address
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
def
run
(
self
):
rootpath
=
'routersploit/modules/'
path
=
'exploits/dlink/'
# only py exploit files
modules
=
[
f
.
replace
(
".py"
,
""
)
for
f
in
listdir
(
rootpath
+
path
)
if
isfile
(
join
(
rootpath
+
path
,
f
))
and
f
.
endswith
(
".py"
)
and
f
!=
"__init__.py"
]
vulns
=
[]
for
module_name
in
modules
:
f
=
path
+
module_name
module
=
imp
.
load_source
(
'module'
,
rootpath
+
f
+
'.py'
)
exploit
=
module
.
Exploit
()
exploit
.
target
=
self
.
target
exploit
.
port
=
self
.
port
res
=
exploit
.
check
()
if
res
is
True
:
print_success
(
"{} is vulnerable"
.
format
(
f
))
vulns
.
append
(
f
)
elif
res
is
False
:
print_error
(
"{} is not vulnerable"
.
format
(
f
))
else
:
print_status
(
"{} could not be verified"
.
format
(
f
))
print
if
len
(
vulns
):
print_success
(
"Device is vulnerable!"
)
for
v
in
vulns
:
print_info
(
" - {}"
.
format
(
v
))
else
:
print_error
(
"Device is not vulnerable to any exploits!"
)
print
def
check
(
self
):
raise
NotImplementedError
(
"Check method is not available"
)
vendor
=
'dlink'
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