From 1db87f150145eeec03aedbbac5f7cef5e8bf7334 Mon Sep 17 00:00:00 2001 From: Isaac Date: Fri, 4 Jul 2025 14:02:20 -0400 Subject: [PATCH] fix-issue-19384 Resolve issue 19384 where msfvenom was unable to be run outside of the metasploit working directory. --- msfvenom | 3 +++ 1 file changed, 3 insertions(+) diff --git a/msfvenom b/msfvenom index b5ccac5cca..9bf6e4dd91 100755 --- a/msfvenom +++ b/msfvenom @@ -1,6 +1,9 @@ #!/usr/bin/env ruby # -*- coding: binary -*- +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('Gemfile', __dir__) +require 'bundler/setup' + class MsfVenomError < StandardError; end class HelpError < StandardError; end class UsageError < MsfVenomError; end