From c5c679cdb7be5a26ca29b89017c88a6bf292363d Mon Sep 17 00:00:00 2001 From: HD Moore Date: Wed, 25 May 2011 00:30:03 +0000 Subject: [PATCH] Remove all calls to framework.db.sync and make this method a no-op now that the task manager is no longer used. git-svn-id: file:///home/svn/framework3/trunk@12708 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/core/auxiliary/crawler.rb | 5 ----- lib/msf/core/db.rb | 3 +-- lib/msf/ui/console/command_dispatcher/db.rb | 16 +--------------- 3 files changed, 2 insertions(+), 22 deletions(-) diff --git a/lib/msf/core/auxiliary/crawler.rb b/lib/msf/core/auxiliary/crawler.rb index 3cab80b868..d0e9da5490 100644 --- a/lib/msf/core/auxiliary/crawler.rb +++ b/lib/msf/core/auxiliary/crawler.rb @@ -169,11 +169,6 @@ module Auxiliary::HttpCrawler # Extract any interesting data from the page crawler_process_page(t, page, cnt) - - # Sync the database every 100 items - if cnt % 100 == 0 - framework.db.sync - end # Blow up if we hit our maximum page count if cnt >= max_page_count diff --git a/lib/msf/core/db.rb b/lib/msf/core/db.rb index 16acf4563e..9aeaf59b35 100644 --- a/lib/msf/core/db.rb +++ b/lib/msf/core/db.rb @@ -195,8 +195,7 @@ class DBManager # Wait for all pending write to finish # def sync - task = queue( Proc.new { } ) - task.wait + # There is no more queue. end # diff --git a/lib/msf/ui/console/command_dispatcher/db.rb b/lib/msf/ui/console/command_dispatcher/db.rb index 3037058809..0b7ca2ed5e 100644 --- a/lib/msf/ui/console/command_dispatcher/db.rb +++ b/lib/msf/ui/console/command_dispatcher/db.rb @@ -43,8 +43,7 @@ class Db "db_status" => "Show the current database status", # Deprecated "db_create" => "Create a brand new database", - "db_destroy" => "Drop an existing database", - "db_sync" => "Synchronize the database", + "db_destroy" => "Drop an existing database" } more = { @@ -293,19 +292,6 @@ class Db set_rhosts_from_addrs(rhosts) if set_rhosts end - def cmd_db_sync_help - print_line "Usage: db_sync" - print_line - print_line "Wait for all pending database writes to complete" - print_line - end - - def cmd_db_sync(*args) - return unless active? - print_status("Synchronizing the database...") - framework.db.sync - end - def cmd_db_services_help # Like db_hosts, use "-h" instead of recreating the column list # here