Closed geokala closed 8 years ago
I still feel like there may be improvements that can be made, but this at least checks whether the address is valid (without using regexes).
Note that socket.inet_aton automatically expands the converted IP (at least on linux).
Using socket.inet_pton would be better, but wouldn't support the wildcards the way they're written.
Thanks, @geokala
I still feel like there may be improvements that can be made, but this at least checks whether the address is valid (without using regexes).
Note that socket.inet_aton automatically expands the converted IP (at least on linux).
Using socket.inet_pton would be better, but wouldn't support the wildcards the way they're written.