remove newlines when importing from an ip list

git-svn-id: file:///home/svn/framework3/trunk@10230 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Joshua Drake 2010-09-03 15:04:09 +00:00
parent bb7ca297a9
commit 57dac0dbf8
1 changed files with 5 additions and 4 deletions

View File

@ -2671,13 +2671,14 @@ class DBManager
wspace = args[:wspace] || workspace
bl = validate_ips(args[:blacklist]) ? args[:blacklist].split : []
data.each_line do |line|
if bl.include? line.strip
data.each_line do |ip|
ip.strip!
if bl.include? ip
next
else
yield(:address,line.strip) if block
yield(:address,ip) if block
end
host = find_or_create_host(:workspace => wspace, :host=> line, :state => Msf::HostState::Alive)
host = find_or_create_host(:workspace => wspace, :host=> ip, :state => Msf::HostState::Alive)
end
end