Added two functions to input.rb from dnstool.rb