We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da160a8 commit a68a185Copy full SHA for a68a185
lib/msf/util/exe.rb
@@ -887,9 +887,10 @@ def self.to_osx_app(exe, opts = {})
887
zip = Rex::Zip::Archive.new
888
zip.add_file("#{app_name}/", '')
889
zip.add_file("#{app_name}/Contents/", '')
890
- zip.add_file("#{app_name}/Contents/MacOS/", '')
891
zip.add_file("#{app_name}/Contents/Resources/", '')
892
- zip.add_file("#{app_name}/Contents/MacOS/#{exe_name}", exe)
+ zip.add_file("#{app_name}/Contents/MacOS/", '')
+ # Add the macho and mark it as executable
893
+ zip.add_file("#{app_name}/Contents/MacOS/#{exe_name}", exe).last.attrs = 0x10
894
zip.add_file("#{app_name}/Contents/Info.plist", info_plist)
895
zip.add_file("#{app_name}/Contents/PkgInfo", 'APPLaplt')
896
zip.pack
0 commit comments