diff --git a/Gemfile.lock b/Gemfile.lock index dbdf9c6fbe90..235af4b05d44 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -383,7 +383,7 @@ GEM rex-socket rex-text rex-struct2 (0.1.3) - rex-text (0.2.44) + rex-text (0.2.45) rex-zip (0.1.4) rex-text rexml (3.2.5) diff --git a/lib/msf/base/simple/buffer.rb b/lib/msf/base/simple/buffer.rb index 6d7183ae8a15..7a1154c4a5ef 100644 --- a/lib/msf/base/simple/buffer.rb +++ b/lib/msf/base/simple/buffer.rb @@ -63,6 +63,8 @@ def self.transform(buf, fmt = "ruby", var_name = 'buf', encryption_opts={}) buf = Rex::Text.encode_base64(buf) when 'go','golang' buf = Rex::Text.to_golang(buf) + when 'nim','nimlang' + buf = Rex::Text.to_nim(buf) else raise BufferFormatError, "Unsupported buffer format: #{fmt}", caller end @@ -97,6 +99,8 @@ def self.comment(buf, fmt = "ruby") buf = Rex::Text.to_psh_comment(buf) when 'go','golang' buf = Rex::Text.to_golang_comment(buf) + when 'nim','nimlang' + buf = Rex::Text.to_nim_comment(buf) else raise BufferFormatError, "Unsupported buffer format: #{fmt}", caller end @@ -122,6 +126,8 @@ def self.transform_formats 'java', 'js_be', 'js_le', + 'nim', + 'nimlang', 'num', 'perl', 'pl',