remove newlines when importing from an ip list
git-svn-id: file:///home/svn/framework3/trunk@10230 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
bb7ca297a9
commit
57dac0dbf8
|
@ -2671,13 +2671,14 @@ class DBManager
|
||||||
wspace = args[:wspace] || workspace
|
wspace = args[:wspace] || workspace
|
||||||
bl = validate_ips(args[:blacklist]) ? args[:blacklist].split : []
|
bl = validate_ips(args[:blacklist]) ? args[:blacklist].split : []
|
||||||
|
|
||||||
data.each_line do |line|
|
data.each_line do |ip|
|
||||||
if bl.include? line.strip
|
ip.strip!
|
||||||
|
if bl.include? ip
|
||||||
next
|
next
|
||||||
else
|
else
|
||||||
yield(:address,line.strip) if block
|
yield(:address,ip) if block
|
||||||
end
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue