Skip to content

Commit

Permalink
Land #16973, Nim formatted byte array support
Browse files Browse the repository at this point in the history
Add MSFvenom support for Nim shellcode
  • Loading branch information
smcintyre-r7 committed Sep 7, 2022
2 parents a11569f + 3fa8c21 commit 11eef99
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions lib/msf/base/simple/buffer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -122,6 +126,8 @@ def self.transform_formats
'java',
'js_be',
'js_le',
'nim',
'nimlang',
'num',
'perl',
'pl',
Expand Down

0 comments on commit 11eef99

Please sign in to comment.