CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/tools/payloads/format_aarch64.rb
Views: 11766
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