Skip to content

Commit

Permalink
feat(ziglang): add buffer/comment support
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiMoebius committed Mar 23, 2024
1 parent 685a2e9 commit 533780b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/msf/base/simple/buffer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def self.transform(buf, fmt = "ruby", var_name = 'buf', encryption_opts={})
buf = Rex::Text.to_nim(buf)
when 'rust', 'rustlang'
buf = Rex::Text.to_rust(buf)
when 'zig','ziglang'
buf = Rex::Text.to_zig(buf)
when 'octal'
buf = Rex::Text.to_octal(buf)
else
Expand Down Expand Up @@ -112,6 +114,8 @@ def self.comment(buf, fmt = "ruby")
buf = Rex::Text.to_nim_comment(buf)
when 'rust', 'rustlang'
buf = Rex::Text.to_rust_comment(buf)
when 'zig','ziglang'
buf = Rex::Text.to_zig_comment(buf)
else
raise BufferFormatError, "Unsupported buffer format: #{fmt}", caller
end
Expand Down Expand Up @@ -155,7 +159,8 @@ def self.transform_formats
'rustlang',
'sh',
'vbapplication',
'vbscript'
'vbscript',
'zig'
]
end

Expand Down

0 comments on commit 533780b

Please sign in to comment.