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
3129d4bc
Unverified
Commit
3129d4bc
authored
6 years ago
by
Marcin Bury
Committed by
GitHub
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Show/Set Payloads issue (#501)
parent
4786423e
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
1 changed file
with
3 additions
and
3 deletions
+3
-3
shell.py
routersploit/core/exploit/shell.py
+3
-3
No files found.
routersploit/core/exploit/shell.py
View file @
3129d4bc
...
@@ -35,7 +35,7 @@ def shell(exploit, architecture="", method="", payloads=None, **params):
...
@@ -35,7 +35,7 @@ def shell(exploit, architecture="", method="", payloads=None, **params):
payload_path
=
path
.
replace
(
"/"
,
"."
)
payload_path
=
path
.
replace
(
"/"
,
"."
)
for
p
in
all_payloads
:
for
p
in
all_payloads
:
module
=
getattr
(
importlib
.
import_module
(
"{}{}"
.
format
(
payload_path
,
p
)),
'
Exploit
'
)
module
=
getattr
(
importlib
.
import_module
(
"{}{}"
.
format
(
payload_path
,
p
)),
'
Payload
'
)
# if method/arch is cmd then filter out payloads
# if method/arch is cmd then filter out payloads
if
method
is
"cmd"
:
if
method
is
"cmd"
:
...
@@ -56,7 +56,7 @@ def shell(exploit, architecture="", method="", payloads=None, **params):
...
@@ -56,7 +56,7 @@ def shell(exploit, architecture="", method="", payloads=None, **params):
if
payload
is
None
:
if
payload
is
None
:
cmd_str
=
"
\001\033
[4m
\002
cmd
\001\033
[0m
\002
> "
cmd_str
=
"
\001\033
[4m
\002
cmd
\001\033
[0m
\002
> "
else
:
else
:
cmd_str
=
"
\001\033
[4m
\002
cmd
\001\033
[0m
\002
(
\033
[94m{}
\033
[0m) > "
.
format
(
payload
.
_
Exploit
__info__
[
"name"
])
cmd_str
=
"
\001\033
[4m
\002
cmd
\001\033
[0m
\002
(
\033
[94m{}
\033
[0m) > "
.
format
(
payload
.
_
Payload
__info__
[
"name"
])
cmd
=
input
(
cmd_str
)
cmd
=
input
(
cmd_str
)
...
@@ -72,7 +72,7 @@ def shell(exploit, architecture="", method="", payloads=None, **params):
...
@@ -72,7 +72,7 @@ def shell(exploit, architecture="", method="", payloads=None, **params):
headers
=
(
"Payload"
,
"Name"
,
"Description"
)
headers
=
(
"Payload"
,
"Name"
,
"Description"
)
data
=
[]
data
=
[]
for
p
in
available_payloads
.
keys
():
for
p
in
available_payloads
.
keys
():
data
.
append
((
p
,
available_payloads
[
p
]
.
_
Exploit__info__
[
"name"
],
available_payloads
[
p
]
.
_Exploit
__info__
[
"description"
]))
data
.
append
((
p
,
available_payloads
[
p
]
.
_
Payload__info__
[
"name"
],
available_payloads
[
p
]
.
_Payload
__info__
[
"description"
]))
print_table
(
headers
,
*
data
)
print_table
(
headers
,
*
data
)
...
...
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