module Nmapr::Options::Targets

Public Instance Methods

exclude(*args) click to toggle source
# File lib/nmapr/options/targets.rb, line 16
def exclude(*args)
  args.each do |arg|
    case arg
    when String
      @not_targets << arg
    when Array
      arg.each { |a| exclude(a) }
    end
  end
end
exclude_file(arg) click to toggle source
# File lib/nmapr/options/targets.rb, line 12
def exclude_file(arg)
  add_argument("--excludefile " << arg)
end
hosts(*args)
Alias for: targets
ips(*args)
Alias for: targets
target(arg) click to toggle source
# File lib/nmapr/options/targets.rb, line 4
def target(arg)
  @targets << arg
end
target_file(arg) click to toggle source
# File lib/nmapr/options/targets.rb, line 8
def target_file(arg)
  add_argument("-iL " << arg)
end
targets(*args) click to toggle source
# File lib/nmapr/options/targets.rb, line 27
def targets(*args)
  args.each do |arg|
    case arg
    when String
      target(arg)
    when Array
      arg.each { |a| targets(a) }
    end
  end
end
Also aliased as: ips, hosts