Module: Ronin::Payloads::Mixins::BindShell
- Includes:
- PostEx
- Included in:
- CMD::Netcat::BindShell, Shellcode::BindShellPayload
- Defined in:
- lib/ronin/payloads/mixins/bind_shell.rb
Overview
Common params and methods for bind shell payloads.
Instance Attribute Summary
Attributes included from PostEx
Class Method Summary collapse
-
.included(payload) ⇒ Object
private
Adds the
host
andport
required options to the payload.
Instance Method Summary collapse
-
#host ⇒ String
The host param value.
- #perform_postlaunch ⇒ Object
-
#port ⇒ Integer
The port param value.
Methods included from PostEx
Class Method Details
.included(payload) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Adds the host
and port
required options to the payload.
43 44 45 46 47 48 49 |
# File 'lib/ronin/payloads/mixins/bind_shell.rb', line 43 def self.included(payload) payload.param :host, String, default: '0.0.0.0', desc: 'The host to connect to' payload.param :port, Integer, required: true, desc: 'The port to listen on' end |
Instance Method Details
#host ⇒ String
The host param value.
56 57 58 |
# File 'lib/ronin/payloads/mixins/bind_shell.rb', line 56 def host params[:host] end |
#perform_postlaunch ⇒ Object
73 74 75 76 77 78 79 |
# File 'lib/ronin/payloads/mixins/bind_shell.rb', line 73 def perform_postlaunch print_info "Connecting to #{host}:#{port} ..." @session = Ronin::PostEx::Sessions::BindShell.connect(host,port) print_info "Connected to #{host}:#{port}!" super end |
#port ⇒ Integer
The port param value.
65 66 67 |
# File 'lib/ronin/payloads/mixins/bind_shell.rb', line 65 def port params[:port] end |