diff --git a/lib/msf/base/simple/buffer.rb b/lib/msf/base/simple/buffer.rb index 886dea06e182..96f3348cce1f 100644 --- a/lib/msf/base/simple/buffer.rb +++ b/lib/msf/base/simple/buffer.rb @@ -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 @@ -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 @@ -155,7 +159,8 @@ def self.transform_formats 'rustlang', 'sh', 'vbapplication', - 'vbscript' + 'vbscript', + 'zig' ] end