metasploit-framework
https://github.com/rapid7/metasploit-framework
Ruby
Metasploit Framework
Net::DNS::Packet#initialize
Create a new instance of Net::DNS::Packet class. Arguments are the
canonical name of the resourse, an optional type field and an optional
class field. The record type and class can be omitted; they default
to +A+ and +IN+.
packet = Net::DNS::Packet.new("www.example.com")
packet = Net::DNS::Packet.new("example.com", Net::DNS::MX)
packet = Net::DNS::Packet.new("example.com",Net::DNS::TXT,Net::DNS::CH)
This class no longer instantiate object from binary data coming from
network streams. Please use Net::DNS::Packet.new_from_data instead.Edit
git clone [email protected]:rapid7/metasploit-framework.git
cd metasploit-framework
open lib/net/dns/packet.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Net--DNS--Packet-initialize-for-pr
# Commit to gitgit add lib/net/dns/packet.rbgit commit -m "better docs for Net::DNS::Packet#initialize"
# 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--Packet-initialize-for-pr
hub pull-request
# Celebrate!