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.
42 43 44 45 46 47 48 |
# File 'lib/ronin/payloads/mixins/bind_shell.rb', line 42 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.
55 56 57 |
# File 'lib/ronin/payloads/mixins/bind_shell.rb', line 55 def host params[:host] end |
#perform_postlaunch ⇒ Object
72 73 74 75 76 77 78 |
# File 'lib/ronin/payloads/mixins/bind_shell.rb', line 72 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.
64 65 66 |
# File 'lib/ronin/payloads/mixins/bind_shell.rb', line 64 def port params[:port] end |