Migration no longer re-adds existing modules to the database. You can now see previous results after you stop/start BeEF

This commit is contained in:
Christian Frichot
2011-11-28 07:27:49 +08:00
parent af7becdfc3
commit 921cf10e55

View File

@@ -33,7 +33,11 @@ module Core
def update_commands!
config = BeEF::Core::Configuration.instance
db_modules = BeEF::Core::Models::CommandModule.all
db_modules = []
BeEF::Core::Models::CommandModule.all.each do |mod|
db_modules << mod.name
end
config.get('beef.module').each{|k,v|
BeEF::Core::Models::CommandModule.new(:name => k, :path => "#{v['path']}module.rb").save if not db_modules.include? k