Skip to content

Instantly share code, notes, and snippets.

@jrozner
Created January 31, 2013 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrozner/4686211 to your computer and use it in GitHub Desktop.
Save jrozner/4686211 to your computer and use it in GitHub Desktop.
msf = BeEF::Extension::Metasploit::RpcClient.instance
if msf.login
msf_module_config = {}
path = BeEF::Core::Configuration.instance.get('beef.extension.metasploit.path')
if not BeEF::Core::Console::CommandLine.parse[:resetdb] and File.exists?("#{path}msf-exploits.cache")
print_debug "Attempting to use Metasploit exploits cache file"
raw = File.read("#{path}msf-exploits.cache")
begin
msf_module_config = YAML.load(raw)
rescue => e
puts e
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment