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
a84c0882
Commit
a84c0882
authored
Jul 21, 2016
by
fwkz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create_exploit(): More elaborate error message
parent
0783f8af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
utils.py
routersploit/utils.py
+10
-4
No files found.
routersploit/utils.py
View file @
a84c0882
...
@@ -539,12 +539,18 @@ def create_exploit(path): # TODO: cover with tests
...
@@ -539,12 +539,18 @@ def create_exploit(path): # TODO: cover with tests
parts
=
path
.
split
(
os
.
sep
)
parts
=
path
.
split
(
os
.
sep
)
module_type
,
name
=
parts
[
0
],
parts
[
-
1
]
module_type
,
name
=
parts
[
0
],
parts
[
-
1
]
if
not
name
:
if
len
(
parts
)
==
1
or
not
name
:
print_error
(
"Invalid exploit name. ;("
)
print_error
(
"Invalid exploit name: '{}'
\n
"
"Use following naming convention: module_type/vendor_name/exploit_name
\n
"
"e.g. exploits/dlink/password_disclosure"
.
format
(
name
))
return
return
if
module_type
not
in
[
'creds'
,
'exploits'
,
'scanners'
]:
types
=
[
'creds'
,
'exploits'
,
'scanners'
]
print_error
(
"Invalid module type. ;("
)
if
module_type
not
in
types
:
print_error
(
"Invalid module type: '{}'
\n
"
"Available types: {}
\n
"
"Use following naming convention: module_type/vendor_name/exploit_name
\n
"
"e.g. exploits/dlink/password_disclosure"
.
format
(
module_type
,
types
))
return
return
create_resource
(
create_resource
(
...
...
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