From 653daac8e66d56d099310d4cb51a009595000664 Mon Sep 17 00:00:00 2001 From: James Lee Date: Wed, 30 Dec 2009 17:43:47 +0000 Subject: [PATCH] remove a debug print and default proto to 'tcp' if it wasn't given git-svn-id: file:///home/svn/framework3/trunk@8034 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/core/db.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/msf/core/db.rb b/lib/msf/core/db.rb index 2083bd4fc3..23f238c8b4 100644 --- a/lib/msf/core/db.rb +++ b/lib/msf/core/db.rb @@ -241,7 +241,8 @@ class DBManager def find_or_initialize_service(opts) addr = opts.delete(:host) || return host = find_or_create_host({:host => addr}) - service = host.services.find_or_initialize_by_port_and_proto(opts[:port], opts[:proto]) + proto = opts[:proto] || 'tcp' + service = host.services.find_or_initialize_by_port_and_proto(opts[:port], proto) opts.each { |k,v| if (service.attribute_names.include?(k.to_s)) service[k] = v @@ -422,7 +423,6 @@ class DBManager data = opts[:data] || return note = workspace.notes.find_or_initialize_by_ntype_and_data(ntype, data.to_yaml) - p note if opts[:host] if opts[:host].kind_of? Host