From 5aeab77499b9f5e6aa6d42ce3d65216b8053d791 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 14 May 2012 07:26:37 -0700 Subject: [PATCH] fix tabs that I missed in db.rb --- lib/msf/core/db.rb | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/lib/msf/core/db.rb b/lib/msf/core/db.rb index c0ddd7bc0b..675a735664 100644 --- a/lib/msf/core/db.rb +++ b/lib/msf/core/db.rb @@ -2600,23 +2600,21 @@ class DBManager filename = args[:filename] wspace = args[:wspace] || workspace - - data = "" - ::File.open(filename, 'rb') do |f| - data = f.read(f.stat.size) - end - import_wapiti_xml(args.merge(:data => data)) - + data = "" + ::File.open(filename, 'rb') do |f| + data = f.read(f.stat.size) + end + import_wapiti_xml(args.merge(:data => data)) end def import_wapiti_xml(args={}, &block) - if block - doc = Rex::Parser::WapitiDocument.new(args,framework.db) {|type, data| yield type,data } - else - doc = Rex::Parser::WapitiDocument.new(args,self) - end - parser = ::Nokogiri::XML::SAX::Parser.new(doc) - parser.parse(args[:data]) + if block + doc = Rex::Parser::WapitiDocument.new(args,framework.db) {|type, data| yield type,data } + else + doc = Rex::Parser::WapitiDocument.new(args,self) + end + parser = ::Nokogiri::XML::SAX::Parser.new(doc) + parser.parse(args[:data]) end def import_libpcap_file(args={})