mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-23 06:37:15 +00:00
fix: [IPAdress] remove leading zeros #465
This commit is contained in:
parent
f9856a1589
commit
cf24c59e1d
1 changed files with 3 additions and 2 deletions
|
@ -32,8 +32,9 @@ def search_ip(message):
|
||||||
results = reg_ip.findall(content)
|
results = reg_ip.findall(content)
|
||||||
matching_ips = []
|
matching_ips = []
|
||||||
|
|
||||||
for res in results:
|
for ip in results:
|
||||||
address = IPv4Address(res)
|
ip = '.'.join([str(int(x)) for x in ip.split('.')])
|
||||||
|
address = IPv4Address(ip)
|
||||||
for network in ip_networks:
|
for network in ip_networks:
|
||||||
if address in network:
|
if address in network:
|
||||||
matching_ips.append(address)
|
matching_ips.append(address)
|
||||||
|
|
Loading…
Reference in a new issue