Let db_autopwn -I/-X work with a single addr

git-svn-id: file:///home/svn/framework3/trunk@7126 4d416f70-5f16-0410-b530-b9f4589650da
unstable
kris 2009-10-04 20:20:43 +00:00
parent 47d8e02389
commit e0f885d50c
1 changed files with 3 additions and 1 deletions

View File

@ -664,7 +664,9 @@ class Db
sets.split(',').each do |set| sets.split(',').each do |set|
rng = set.split('-').map{ |c| Rex::Socket::addr_atoi(c) } rng = set.split('-').map{ |c| Rex::Socket::addr_atoi(c) }
tst = Rex::Socket::addr_atoi(addr) tst = Rex::Socket::addr_atoi(addr)
if (tst >= rng[0] and tst <= rng[1]) if (not rng[1])
return tst == rng[0]
elsif (tst >= rng[0] and tst <= rng[1])
return true return true
end end
end end