Class: Ronin::CLI::Commands::New::DnsProxy Private

Inherits:
Ronin::CLI::Command show all
Includes:
Core::CLI::Generator
Defined in:
lib/ronin/cli/commands/new/dns_proxy.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Creates a new ronin-dns-proxy script.

Usage

ronin new dns-proxy PATH

Options

-H, --host IP                    The IP to listen on (Default: 127.0.0.1)
-p, --port PORT                  The port number to listen on (Default: 2345)
-h, --help                       Print help information

Arguments

PATH                             The script file to create

Since:

  • 2.1.0

Instance Method Summary collapse

Instance Method Details

#run(path) ⇒ 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.

Runs the ronin new dns-proxy command.

Parameters:

  • path (String)

    The path to the new script file to create.

Since:

  • 2.1.0



87
88
89
90
91
92
93
# File 'lib/ronin/cli/commands/new/dns_proxy.rb', line 87

def run(path)
  @host = options[:host]
  @port = options[:port]

  erb 'dns_proxy.rb.erb', path
  chmod '+x', path
end