metasploit-framework

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

Ruby

Metasploit Framework

Msf::Post::Windows::Accounts#get_domain

get_domain(server_name = nil)

Summary:
  Retrieves the current DomainName the given server is
  a member of.

Parameters
  server_name - DNS or NetBIOS name of the remote server
Returns:
  The DomainName of the remote server or nil if windows
  could not retrieve the DomainControllerInfo or encountered
  an exception.

Source | Google | Stack overflow

Edit

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

cd metasploit-framework

open lib/msf/core/post/windows/accounts.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Msf--Post--Windows--Accounts-get_domain-for-pr


# Commit to git

git add lib/msf/core/post/windows/accounts.rbgit commit -m "better docs for Msf::Post::Windows::Accounts#get_domain"


# Open pull request

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

hub fork

git push <your name> -your-name--update-docs-Msf--Post--Windows--Accounts-get_domain-for-pr

hub pull-request


# Celebrate!