Class: Masscan::Program Deprecated

Inherits:
Command
  • Object
show all
Defined in:
lib/masscan/program.rb

Overview

Deprecated.

Please use Command instead.

Class Method Summary collapse

Class Method Details

.scan(options = {}) {|masscan| ... } ⇒ Boolean

Runs masscan.

Examples:

Specifying masscan options via a Hash:

Masscan::Command.scan(
  ips: '192.168.1.1/24',
  ports: [22, 80, 443],
)

Specifying masscan options via a block:

Masscan::Command.scan do |masscan|
  masscan.ips = '192.168.1.1/24'
  masscan.ports = [22, 80, 443]
end

Parameters:

  • options (Hash{Symbol => Object}) (defaults to: {})

    Additional options for masscan.

Yields:

  • (masscan)

    If a block is given, it will be passed the new masscan instance used to specify options for masscan.

Yield Parameters:

  • masscan (Masscan)

    The masscan instance.

Returns:

  • (Boolean)

    Specifies whether the command exited normally.



39
40
41
# File 'lib/masscan/program.rb', line 39

def self.scan(options={},&block)
  run(options,&block)
end

.sudo_scan(options = {}, &block) ⇒ Object

Runs masscan but under sudo.

See Also:



48
49
50
# File 'lib/masscan/program.rb', line 48

def self.sudo_scan(options={},&block)
  sudo(options,&block)
end