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
d4d59353
Commit
d4d59353
authored
Jul 21, 2016
by
fwkz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create_exploit(): adding vendor validation
parent
a84c0882
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
utils.py
routersploit/utils.py
+7
-2
No files found.
routersploit/utils.py
View file @
d4d59353
...
@@ -537,9 +537,14 @@ def create_exploit(path): # TODO: cover with tests
...
@@ -537,9 +537,14 @@ def create_exploit(path): # TODO: cover with tests
from
.templates
import
exploit
from
.templates
import
exploit
parts
=
path
.
split
(
os
.
sep
)
parts
=
path
.
split
(
os
.
sep
)
module_type
,
name
=
parts
[
0
],
parts
[
-
1
]
module_type
,
vendor
,
name
=
parts
[
0
],
[
1
],
parts
[
-
1
]
if
len
(
parts
)
<
3
:
print_error
(
"Invalid format. "
"Use following naming convention: module_type/vendor_name/exploit_name
\n
"
"e.g. exploits/dlink/password_disclosure"
.
format
(
name
))
return
if
len
(
parts
)
==
1
or
not
name
:
if
not
name
:
print_error
(
"Invalid exploit name: '{}'
\n
"
print_error
(
"Invalid exploit name: '{}'
\n
"
"Use following naming convention: module_type/vendor_name/exploit_name
\n
"
"Use following naming convention: module_type/vendor_name/exploit_name
\n
"
"e.g. exploits/dlink/password_disclosure"
.
format
(
name
))
"e.g. exploits/dlink/password_disclosure"
.
format
(
name
))
...
...
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