From b965d4b6c8034a3beed311344c3b84304e608054 Mon Sep 17 00:00:00 2001 From: Tod Beardsley Date: Mon, 25 Jul 2011 13:24:41 +0000 Subject: [PATCH] Avoid a problem with phantom services on port 0 git-svn-id: file:///home/svn/framework3/trunk@13334 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/core/db.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/msf/core/db.rb b/lib/msf/core/db.rb index c5a20eb2bf..5c05d67b73 100644 --- a/lib/msf/core/db.rb +++ b/lib/msf/core/db.rb @@ -2209,6 +2209,8 @@ class DBManager pkt = PacketFu::Packet.parse(p) rescue next # Just silently skip bad packets next unless pkt.is_ip? # Skip anything that's not IP. Technically, not Ethernet::Ip + next if pkt.is_tcp? && (pkt.tcp_src == 0 || pkt.tcp_dst == 0) # Skip port 0 + next if pkt.is_udp? && (pkt.udp_src == 0 || pkt.udp_dst == 0) # Skip port 0 saddr = pkt.ip_saddr daddr = pkt.ip_daddr