Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ziglang): add buffer/comment support #19003

Merged
merged 2 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ GEM
rex-socket
rex-text
rex-struct2 (0.1.4)
rex-text (0.2.56)
rex-text (0.2.57)
rex-zip (0.1.5)
rex-text
rexml (3.2.6)
Expand Down
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
Loading