parent
3d8f61a3ad
commit
174d656cf9
|
@ -9,13 +9,13 @@ class FilterModule(object):
|
||||||
}
|
}
|
||||||
|
|
||||||
def to_nebula_ip(self, ip_str):
|
def to_nebula_ip(self, ip_str):
|
||||||
ip_list = map(int, ip_str.split("."))
|
ip_list = list(map(int, ip_str.split(".")))
|
||||||
ip_list[0] = 10
|
ip_list[0] = 10
|
||||||
ip_list[1] = 168
|
ip_list[1] = 168
|
||||||
ip = '.'.join(map(str, ip_list))
|
ip = '.'.join(map(str, ip_list))
|
||||||
return ip
|
return ip
|
||||||
|
|
||||||
def map_to_nebula_ips(self, ip_strs):
|
def map_to_nebula_ips(self, ip_strs):
|
||||||
ip_list = [ self.to_nebula_ip(ip_str) for ip_str in ip_strs ]
|
ip_list = [ self.to_nebula_ip(ip_str) for ip_str in ip_strs ]
|
||||||
ips = ', '.join(ip_list)
|
ips = ', '.join(ip_list)
|
||||||
return ips
|
return ips
|
||||||
|
|
Loading…
Reference in New Issue