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
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue