Commit bdfab7f1 authored by Benjamin Graillot's avatar Benjamin Graillot Committed by root
Browse files

Oopsie

parent 4324f30e
......@@ -119,11 +119,11 @@ if __name__ == "__main__":
opening = entry['description'][0].decode('utf-8').strip()
opening = opening.split(',')
opening = [ tuple(open.split(':')) for open in opening ]
if subnet in config['DEFAULT_SERVICES']:
opening += tuple(config['DEFAULT_SERVICES'][subnet])
ip_addresses = [ipaddress.ip_address(ip.decode('utf-8')) for ip in entry['ipHostNumber']]
opening_in = { open[1] for open in opening if open[0] == 'in' }
opening_out = { open[1] for open in opening if open[0] == 'out' }
if subnet in config['DEFAULT_SERVICES']:
opening += config['DEFAULT_SERVICES'][subnet]
for ip in ip_addresses:
tcp_ports_in = [ services[service][0] for service in opening_in if 'tcp' in services[service][1] ]
tcp_ports_in.sort()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment