metasploit-framework
https://github.com/rapid7/metasploit-framework
Ruby
Metasploit Framework
Net::DNS::Header#format
The Net::DNS::Header#format method prints out the header
in a special ascii representation of data, in a way
similar to those often found on RFCs.
p Net::DNS::Header.new.format
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# | 18123 |
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# |0| 0 |0|0|1|0|0| 0 | 0 |
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# | 1 |
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# | 0 |
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# | 0 |
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# | 0 |
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This can be very usefull for didactical purpouses :)Edit
git clone [email protected]:rapid7/metasploit-framework.git
cd metasploit-framework
open lib/net/dns/header.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Net--DNS--Header-format-for-pr
# Commit to gitgit add lib/net/dns/header.rbgit commit -m "better docs for Net::DNS::Header#format"
# 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--Header-format-for-pr
hub pull-request
# Celebrate!