OwlCyberSecurity - MANAGER
Edit File: inet.cpython-36.pyc
3 �b�W�������������������@���sj���d�Z�ddlZddlZddlZejZy ejZW�n�ek rD���dZY�nX�dd��Zdd��Z dd ��Z d d��ZdS�)z*Generic Internet address helper functions.�����Ni'��c�������������C���s0���|�t�krtjj|�S�|�tkr(tjj|�S�t�dS�)a*��Convert the textual form of a network address into its binary form. @param family: the address family @type family: int @param text: the textual address @type text: string @raises NotImplementedError: the address family specified is not implemented. @rtype: string N)�AF_INET�dns�ipv4� inet_aton�AF_INET6�ipv6�NotImplementedError)�family�text��r����/usr/lib/python3.6/inet.py� inet_pton&���s ����r ���c�������������C���s0���|�t�krtjj|�S�|�tkr(tjj|�S�t�dS�)a/��Convert the binary form of a network address into its textual form. @param family: the address family @type family: int @param address: the binary address @type address: string @raises NotImplementedError: the address family specified is not implemented. @rtype: string N)r���r���r���Z inet_ntoar���r���r���)r ���Zaddressr���r���r���� inet_ntop:���s ����r���c�������������C���sL���yt�jj|���tS��tk rF���yt�jj|���tS����t�Y�nX�Y�nX�dS�)z�Determine the address family of a textual-form network address. @param text: the textual address @type text: string @raises ValueError: the address family cannot be determined from the input. @rtype: int N)r���r���r���r���� Exceptionr���r���� ValueError)r ���r���r���r����af_for_addressM���s����r���c�������������C���st���y$t�tjj|��d��}|dko$|dkS��tk rn���yt�tjj|��d��}|dkS��tk rh���t�Y�nX�Y�nX�dS�)z�Is the textual-form network address a multicast address? @param text: the textual address @raises ValueError: the address family cannot be determined from the input. @rtype: bool r�����������������N)�ordr���r���r���r���r���r���)r ����firstr���r���r����is_multicast`���s����r���)�__doc__ZsocketZdns.ipv4r���Zdns.ipv6r���r����AttributeErrorr ���r���r���r���r���r���r���r����<module>���s���