contrib: makeseeds: dedup by ip,port
Handle the multiple ports per IP case (as that's a criterion later).
This commit is contained in:
parent
3314d87966
commit
c254a9ef69
1 changed files with 2 additions and 2 deletions
|
@ -108,10 +108,10 @@ def parseline(line):
|
|||
}
|
||||
|
||||
def dedup(ips):
|
||||
'''deduplicate by address'''
|
||||
'''deduplicate by address,port'''
|
||||
d = {}
|
||||
for ip in ips:
|
||||
d[ip['ip']] = ip
|
||||
d[ip['ip'],ip['port']] = ip
|
||||
return list(d.values())
|
||||
|
||||
def filtermultiport(ips):
|
||||
|
|
Loading…
Add table
Reference in a new issue