metasploit-framework
https://github.com/rapid7/metasploit-framework
Ruby
Metasploit Framework
Net::DNS::Resolver#logger=
This one permits to have a personal logger facility to handle
resolver messages, instead of new built-in one, which is set up
for a +$stdout+ (or +$stderr+) use.
If you want your own logging facility you can create a new instance
of the +Logger+ class:
log = Logger.new("/tmp/resolver.log","weekly",2*1024*1024)
log.level = Logger::DEBUG
log.progname = "ruby_resolver"
and then pass it to the resolver:
res.logger = log
Note that this will destroy the precedent logger.Edit
git clone [email protected]:rapid7/metasploit-framework.git
cd metasploit-framework
open lib/net/dns/resolver.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Net--DNS--Resolver-logger--for-pr
# Commit to gitgit add lib/net/dns/resolver.rbgit commit -m "better docs for Net::DNS::Resolver#logger="
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Net--DNS--Resolver-logger--for-pr
hub pull-request
# Celebrate!