metasploit-framework

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

Ruby

Metasploit Framework

Net::DNS::Resolver#mx

Performs an MX query for the domain name passed as parameter.

It actually uses the same methods a normal Resolver query would
use, but automatically sort the results based on preferences
and returns an ordered array.

Example:

  res = Net::DNS::Resolver.new
  res.mx("google.com")

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-mx-for-pr


# Commit to git

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


# 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-mx-for-pr

hub pull-request


# Celebrate!