metasploit-framework
https://github.com/rapid7/metasploit-framework
Ruby
Metasploit Framework
Net::DNS::Packet#data_comp
Same as Net::DNS::Packet#data, but implements name compression
(see RFC1025) for a considerable save of bytes.
packet = Net::DNS::Packet.new("www.example.com")
puts "Size normal is #{packet.data.size} bytes"
puts "Size compressed is #{packet.data_comp.size} bytes"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-data_comp-for-pr
# Commit to gitgit add lib/net/dns/packet.rbgit commit -m "better docs for Net::DNS::Packet#data_comp"
# 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-data_comp-for-pr
hub pull-request
# Celebrate!