Sha256: 1bef17bc2380e25e9f91013db03051b44cc3d31baacaa99dab2b4710ebbf53eb

Contents?: true

Size: 728 Bytes

Versions: 1

Compression:

Stored size: 728 Bytes

Contents

#!/usr/bin/env ruby

require 'proxy_finder'
require 'optparse'

files = Hash.new

option_parser = OptionParser.new do |opts|

  opts.banner = "Usage: proxy_finder -i INFILE -o OUTFILE"

  opts.on('-i', '--infile FILENAME', 'File containing hosts to test.') do |filename|
    files[:infile] = filename
  end

  opts.on('-o', '--outfile FILENAME', 'File to output working hosts.') do |filename|
    files[:outfile] = filename
  end

  opts.on("-h", "--help", "This usage menu.") do
    puts option_parser
  end

end

option_parser.parse!

unless files[:infile] && files[:outfile]
  puts option_parser
end

# Allows halting via ctrl-c
trap("SIGINT") { throw :ctrl_c }

catch :ctrl_c do
  pf = ProxyFinder.new
  pf.start(files)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
proxy_finder-0.0.1 bin/proxy_finder