CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/tools/payloads/format_aarch64.rb
Views: 1904
1
result = STDIN
2
.each_line(chomp: true)
3
.reject(&:empty?)
4
.map do |line|
5
is_label = line.start_with?("<")
6
next "# #{line}" if is_label
7
bytes, description = line.split("\t", 2)
8
"0x#{bytes.split(" ").reverse.join}, # #{description}"
9
end
10
11
puts result
12
13