metasploit-framework

https://github.com/rapid7/metasploit-framework

Ruby

Metasploit Framework

Net::DNS::Resolver#tcp_timeout

Return an object representing the value of the stored TCP
timeout the resolver will use in is queries. This object
is an instance of the class +TcpTimeout+, and two methods
are available for printing informations: TcpTimeout#to_s
and TcpTimeout#pretty_to_s.

Here's some example:

  puts "Timeout of #{res.tcp_timeout} seconds" # implicit to_s
    #=> Timeout of 150 seconds

  puts "You set a timeout of " + res.tcp_timeout.pretty_to_s
    #=> You set a timeout of 2 minutes and 30 seconds

If the timeout is infinite, a string "infinite" will
be returned.

Source | Google | Stack overflow

Edit

git clone [email protected]:rapid7/metasploit-framework.git

cd metasploit-framework

open lib/net/dns/resolver.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Net--DNS--Resolver-tcp_timeout-for-pr


# Commit to git

git add lib/net/dns/resolver.rbgit commit -m "better docs for Net::DNS::Resolver#tcp_timeout"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Net--DNS--Resolver-tcp_timeout-for-pr

hub pull-request


# Celebrate!