Tag Archives: socket.gethostbyname

[python] resolve a list of items from file

The list can be ip address, ip address range, ip subnet, firewall objects or hostname. The objective: If item is resolvable, resolve it and collect the ip address. If item is unresolvable, will collect it as it is. The list … Continue reading

Posted in Python, Scripting | Tagged , , | Leave a comment

[python]Resolve dns if hostname is resolvable else send as is

There are times which you need to try to resolve valid hostnames, however on user’s input there could be a possibility that the input contains ip addres, firewall objects or firewall object groups that are not resolvable. here’s a solution … Continue reading

Posted in Python, Scripting | Tagged , | Leave a comment