OwlCyberSecurity - MANAGER
Edit File: socket.pyc
� zfc�����������@���s���d��Z��d�d�l�Z�d�d�l�Td�d�l�m�Z�d�d�l�m�Z�y�d�d�l�Z�Wn�e�k �r_�n��Xe�e�d���Z �d�d�l�m �Z�d�d�l�m�Z�m �Z �m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�y�d�d �l�m�Z�Wn�e�k �r��n�Xd�d�l�Z�d�d�l�Z�d�d�l�Z�y�d�d �l�m�Z�Wn!�e�k �rNd�d �l�m�Z�n�Xy�d�d�l�Z�Wn�e�k �rxe�Z�n�Xe�e�d�d���Z�e�e�d �d���Z �d�d�g�Z!�e!�j"�e�j#�e�����e$�Z%�e�j&�j'����j(�d���r�i��Z)�d�e)�d�<d�e)�d�<d�e)�d�<d�e)�d�<d�e)�d�<d�e)�d�<d�e)�d�<d �e)�d!�<d"�e)�d#�<d$�e)�d%�<d&�e)�d'�<d(�e)�d)�<d*�e)�d+�<d,�e)�d-�<d.�e)�d/�<e!�j*�d0���n��d1�d2���Z+�d3�d4�d5�d6�d7�d8�d9�d:�d;�d<�d=�d>�d?�d@�f�Z,�e�j-�dA�k�r�e,�dB�f�Z,�n��e�j&�dC�k�re,�dD�f�Z,�n��dE�dF�dG�dH�dI�dJ�f�Z.�dK�e/�f�dL�������YZ0�dM�e/�f�dN�������YZ1�dO����Z2�x]�e,�D]U�Z3�e�e2�e3���Z4�e3�e4�_5�e�e%�e3���j��e4�_��e�e4�e�e1���Z6�e7�e1�e3�e6���qWWe1�Z$�Z8�dP�e/�f�dQ�������YZ9�e/����Z:�e:�e�dR���Z;�d�S(S���s��This module provides socket operations and some related functions. On Unix, it supports IP (Internet Protocol) and Unix domain sockets. On other systems, it only supports IP. Functions specific for a socket are available as methods of the socket object. Functions: socket() -- create a new socket object socketpair() -- create a pair of new socket objects [*] fromfd() -- create a socket object from an open file descriptor [*] gethostname() -- return the current hostname gethostbyname() -- map a hostname to its IP number gethostbyaddr() -- map an IP number or hostname to DNS info getservbyname() -- map a service name and a protocol name to a port number getprotobyname() -- map a protocol name (e.g. 'tcp') to a number ntohs(), ntohl() -- convert 16, 32 bit int from network to host byte order htons(), htonl() -- convert 16, 32 bit int from host to network byte order inet_aton() -- convert IP addr string (123.45.67.89) to 32-bit packed format inet_ntoa() -- convert 32-bit packed format IP to string (123.45.67.89) ssl() -- secure socket layer support (only available if configured) socket.getdefaulttimeout() -- get the default timeout value socket.setdefaulttimeout() -- set the default timeout value create_connection() -- connects to an address, with an optional timeout and optional source address. [*] not available on all platforms! Special objects: SocketType -- type object for socket objects error -- exception raised for I/O errors has_ipv6 -- boolean value indicating if IPv6 is supported Integer constants: AF_INET, AF_UNIX -- socket domains (first argument to socket() call) SOCK_STREAM, SOCK_DGRAM, SOCK_RAW -- socket types (second argument) Many other constants may be defined; these may be used in calls to the setsockopt() and getsockopt() methods. i����N(���t���*(���t���partial(���t ���MethodTypec���������C���s5���d�d��l��}�t�j�d�t�d�d��|�j�|��|�|���S(���Ni����s;���socket.ssl() is deprecated. Use ssl.wrap_socket() instead.t ���stackleveli���(���t���sslt���warningst���warnt���DeprecationWarningt���sslwrap_simple(���t���sockt���keyfilet���certfilet���_realssl(����(����s���/usr/lib64/python2.7/socket.pyR���:���s���� (���t���SSLError(���t���RAND_addt���RAND_statust���SSL_ERROR_ZERO_RETURNt���SSL_ERROR_WANT_READt���SSL_ERROR_WANT_WRITEt���SSL_ERROR_WANT_X509_LOOKUPt���SSL_ERROR_SYSCALLt ���SSL_ERROR_SSLt���SSL_ERROR_WANT_CONNECTt ���SSL_ERROR_EOFt���SSL_ERROR_INVALID_ERROR_CODE(���t���RAND_egd(���t���StringIOt���EBADFi ���t���EINTRi���t���getfqdnt���create_connectiont���wins���The operation was interrupted.i'��s���A bad file handle was passed.i'��s���Permission denied.i'��s!���A fault occurred on the network??i'��s#���An invalid operation was attempted.i&'��s ���The socket operation would blocki3'��s,���A blocking operation is already in progress.i4'��s���The network address is in use.i@'��s���The connection has been reset.iF'��s���The network has been shut down.iJ'��s���The operation timed out.iL'��s���Connection refused.iM'��s���The name is too long.iO'��s���The host is down.iP'��s���The host is unreachable.iQ'��t���errorTabt����c���������C���s����|��j�����}��|��s�|��d�k�r+�t����}��n��y�t�|����\�}�}�}�Wn�t�k �rW�n8�X|�j�d�|���x$�|�D]�}��d�|��k�ro�Pqo�qo�W|�}��|��S(���s��Get fully qualified domain name from name. An empty argument is interpreted as meaning the local host. First the hostname returned by gethostbyaddr() is checked, then possibly existing aliases. In case no FQDN is available, hostname from gethostname() is returned. s���0.0.0.0i����t���.(���t���stript���gethostnamet ���gethostbyaddrt���errort���insert(���t���namet���hostnamet���aliasest���ipaddrs(����(����s���/usr/lib64/python2.7/socket.pyR�������s���� t���bindt���connectt ���connect_ext���filenot���listent���getpeernamet���getsocknamet ���getsockoptt ���setsockoptt���sendallt���setblockingt ���settimeoutt ���gettimeoutt���shutdownt���ntt���ioctlt���riscost ���sleeptaskwt���recvt���recvfromt ���recv_intot ���recvfrom_intot���sendt���sendtot ���_closedsocketc�����������B���s7���e��Z�g��Z�d�����Z�e�Z�Z�Z�Z�Z�Z �e�Z �RS(���c����������G���s���t��t�d�����d��S(���Ns���Bad file descriptor(���R&���R���(���t���args(����(����s���/usr/lib64/python2.7/socket.pyt���_dummy����s����(���t���__name__t ���__module__t ���__slots__RF���RB���R>���R@���RC���R?���RA���t���__getattr__(����(����(����s���/usr/lib64/python2.7/socket.pyRD�������s��� t ���_socketobjectc�����������B���s����e��Z�e�j�Z�d��d�g�e�e���Z�e�e�d�d�d���Z �e�e�e�d���Z �e�j �j�e �_�d����Z�e�j�j�e�_�d����Z�d�d�d ���Z�e�d ����d�d��Z�e�d ����d�d��Z�e�d����d�d��Z�RS(���t���_sockt���__weakref__i����c���������C���sX���|�d��k�r!�t�|�|�|���}�n��|�|��_�x'�t�D]�}�t�|��|�t�|�|�����q1�Wd��S(���N(���t���Nonet���_realsocketRL���t���_delegate_methodst���setattrt���getattr(���t���selft���familyt���typet���protoRL���t���method(����(����s���/usr/lib64/python2.7/socket.pyt���__init__����s ���� c���������C���s=���|����|��_��|��j��j�}�x�|�D]�}�|�|��|�|���q�Wd��S(���N(���RL���RF���(���RS���RD���RP���RQ���t���dummyRW���(����(����s���/usr/lib64/python2.7/socket.pyt���close����s���� c���������C���s(���|��j��j����\�}�}�t�d�|���|�f�S(���NRL���(���RL���t���acceptRK���(���RS���R ���t���addr(����(����s���/usr/lib64/python2.7/socket.pyR[�������s����c���������C���s���t��d�|��j���S(���sa���dup() -> socket object Return a new socket object connected to the same system resource.RL���(���RK���RL���(���RS���(����(����s���/usr/lib64/python2.7/socket.pyt���dup����s����t���ri����c���������C���s���t��|��j�|�|���S(���s����makefile([mode[, bufsize]]) -> file object Return a regular file object corresponding to the socket. The mode and bufsize arguments are as for the built-in open() function.(���t���_fileobjectRL���(���RS���t���modet���bufsize(����(����s���/usr/lib64/python2.7/socket.pyt���makefile����s����c���������C���s ���|��j��j�S(���N(���RL���RT���(���RS���(����(����s���/usr/lib64/python2.7/socket.pyt���<lambda>����R!���t���docs���the socket familyc���������C���s ���|��j��j�S(���N(���RL���RU���(���RS���(����(����s���/usr/lib64/python2.7/socket.pyRc�������R!���s���the socket typec���������C���s ���|��j��j�S(���N(���RL���RV���(���RS���(����(����s���/usr/lib64/python2.7/socket.pyRc�������R!���s���the socket protocolN(���RG���RH���RO���t���__doc__t���listRP���RI���t���AF_INETt���SOCK_STREAMRN���RX���RD���RQ���RZ���R[���R]���Rb���t���propertyRT���RU���RV���(����(����(����s���/usr/lib64/python2.7/socket.pyRK�������s��� c���������G���s���t��|�j�|����|����S(���N(���RR���RL���(���R(���RS���RE���(����(����s���/usr/lib64/python2.7/socket.pyt���meth����s����R_���c�������� ���B���s����e��Z�d��Z�d�Z�d�Z�d�d�d�d�d�d�d �d �d�d�g �Z�d �d�e�d���Z�d����Z�e �e�d�d��Z �d����Z�d����Z�d����Z �d����Z�d����Z�d����Z�d�d���Z�d�d���Z�d�d���Z�d����Z�d����Z�RS(���s-���Faux file object attached to a socket object.i� ��s���<socket>R`���Ra���t ���softspaceRL���t ���_rbufsizet ���_wbufsizet���_rbuft���_wbuft ���_wbuf_lent���_closet���rbi����c���������C���s����|�|��_��|�|��_�|�d�k��r*�|��j�}�n��|�|��_�t�|��_�|�d�k�rT�d�|��_�n$�|�d�k�ro�|��j�|��_�n �|�|��_�|�|��_�t����|��_ �g��|��_ �d�|��_�|�|��_�d��S(���Ni����i���( ���RL���R`���t���default_bufsizeRa���t���FalseRk���Rl���Rm���R���Rn���Ro���Rp���Rq���(���RS���R ���R`���Ra���RZ���(����(����s���/usr/lib64/python2.7/socket.pyRX�������s ���� c���������C���s ���|��j��d��k�S(���N(���RL���RN���(���RS���(����(����s���/usr/lib64/python2.7/socket.pyt ���_getclosed��s����Rd���s���True if the file is closedc���������C���sD���z�|��j��r�|��j����n��Wd��|��j�r6�|��j��j����n��d��|��_��Xd��S(���N(���RL���t���flushRq���RZ���RN���(���RS���(����(����s���/usr/lib64/python2.7/socket.pyRZ�����s���� c���������C���s���y�|��j�����Wn�n�Xd��S(���N(���RZ���(���RS���(����(����s���/usr/lib64/python2.7/socket.pyt���__del__!��s����c���������C���s����|��j��r��d�j�|��j����}�g��|��_��d�|��_�t�|��j�|��j���}�t�|���}�d�}�t�|���}�z<�x5�|�|�k��r��|��j�j �|�|�|�|�!��|�|�7}�qf�WWd��|�|�k��r��|�|�}�~�~�|��j��j �|���t�|���|��_�n��Xn��d��S(���NR!���i����(���Ro���t���joinRp���t���maxRl���Rs���t���lent ���memoryviewRL���R5���t���append(���RS���t���datat���buffer_sizet ���data_sizet���write_offsett���viewt ���remainder(����(����s���/usr/lib64/python2.7/socket.pyRv���(��s"���� c���������C���s ���|��j��j����S(���N(���RL���R/���(���RS���(����(����s���/usr/lib64/python2.7/socket.pyR/���<��s����c���������C���s����t��|���}�|�s�d��S|��j�j�|���|��j�t�|���7_�|��j�d�k�s��|��j�d�k�re�d�|�k�s��|��j�d�k�r��|��j�|��j�k�r��|��j����n��d��S(���Ni����i���s��� (���t���strRo���R|���Rp���Rz���Rm���Rv���(���RS���R}���(����(����s���/usr/lib64/python2.7/socket.pyt���write?��s����!c���������C���sx���t��d��t�t�|�����}�|��j�t�t�t�|�����7_�|��j�j�|���|��j �d�k�sg�|��j�|��j �k�rt�|��j ����n��d��S(���Ni���(���t���filterRN���t���mapR����Rp���t���sumRz���Ro���t���extendRm���Rv���(���RS���Rf���t���lines(����(����s���/usr/lib64/python2.7/socket.pyt ���writelinesJ��s����c��� ������C���s��t��|��j�|��j���}�|��j�}�|�j�d�d���|�d�k��r��t����|��_�xi�t�r��y�|��j�j�|���}�Wn/�t �k �r��}�|�j �d�t�k�r��qI�n�����n�X|�s��Pn��|�j�|���qI�W|�j ����S|�j����}�|�|�k�r|�j�d���|�j�|���}�t����|��_�|��j�j�|�j������|�St����|��_�x��t�r |�|�}�y�|��j�j�|���}�Wn/�t �k �r|}�|�j �d�t�k�rvq%n�����n�X|�s�Pn��t�|���} �| �|�k�r�|�r�|�S| �|�k�r�|�j�|���~�Pn��| �|�k�s�t�d�|�| �f�����|�j�|���|�| �7}�~�q%W|�j ����Sd��S(���Ni����i���s���recv(%d) returned %d bytes(���Ry���Rl���Rs���Rn���t���seekR���t���TrueRL���R>���R&���RE���R���R����t���getvaluet���tellt���readRz���t���AssertionError( ���RS���t���sizet���rbufsizet���bufR}���t���et���buf_lent���rvt���leftt���n(����(����s���/usr/lib64/python2.7/socket.pyR����T��s\���� " c��� ������C���s��|��j��}�|�j�d�d���|�j����d�k�r��|�j�d���|�j�|���}�|�j�d���sh�t�|���|�k�r��t����|��_��|��j��j�|�j������|�S~�n��|�d�k��rV|��j �d�k�rp|�j�d���|�j����g�}�t����|��_��d��}�|��j�j�}�xw�t �rby:�x3�|�d�k�r*|�d���}�|�sPn��|�j�|���q��WWn/�t�k �r]}�|�j�d�t�k�rWq��n�����n�XPq��Wd�j�|���S|�j�d�d���t����|��_��x��t �rKy�|��j�j�|��j ���}�Wn/�t�k �r�}�|�j�d�t�k�r�q�n�����n�X|�s�Pn��|�j�d���}�|�d�k�r;|�d�7}�|�j�|�|� ��|��j��j�|�|���~�Pn��|�j�|���q�W|�j����S|�j�d�d���|�j����} �| �|�k�r�|�j�d���|�j�|���} �t����|��_��|��j��j�|�j������| �St����|��_��x=t �ry�|��j�j�|��j ���}�Wn/�t�k �r}�|�j�d�t�k�rq�n�����n�X|�s*Pn��|�| �}�|�j�d�d�|���}�|�d�k�r�|�d�7}�|��j��j�|�|���| �r�|�j�|�|� ��Pq�|�|� Sn��t�|���}�|�|�k�r�| �r�|�S|�|�k�r�|�j�|�|� ��|��j��j�|�|���Pn��|�j�|���| �|�7} �q�W|�j����Sd��S(���Ni����i���s��� i���R!���(���Rn���R����R����t���readlinet���endswithRz���R���R����R����Rl���RN���RL���R>���R����R|���R&���RE���R���Rx���t���findR����( ���RS���R����R����t���blinet���buffersR}���R>���R����t���nlR����R����R����R����(����(����s���/usr/lib64/python2.7/socket.pyR�������s����� ! i����c���������C���sf���d�}�g��}�xS�t��ra�|��j����}�|�s+�Pn��|�j�|���|�t�|���7}�|�r�|�|�k�r�Pq�q�W|�S(���Ni����(���R����R����R|���Rz���(���RS���t���sizehintt���totalRf���t���line(����(����s���/usr/lib64/python2.7/socket.pyt ���readlines��s���� c���������C���s���|��S(���N(����(���RS���(����(����s���/usr/lib64/python2.7/socket.pyt���__iter__��s����c���������C���s���|��j�����}�|�s�t���n��|�S(���N(���R����t ���StopIteration(���RS���R����(����(����s���/usr/lib64/python2.7/socket.pyt���next��s���� (���RG���RH���Re���Rs���R(���RI���Rt���RX���Ru���Ri���t���closedRZ���Rw���Rv���R/���R����R����R����R����R����R����R����(����(����(����s���/usr/lib64/python2.7/socket.pyR_�������s(��� Fi c���������C���s���|��\�}�}�d�}�x��t�|�|�d�t���D]��}�|�\�}�}�} �} �}�d�}�yY�t�|�|�| ���}�|�t�k �rz�|�j�|���n��|�r��|�j�|���n��|�j�|���|�SWq(�t�k �r��} �| �}�|�d�k �r��|�j ����q��q(�Xq(�W|�d�k �r��|���n�t�d�����d�S(���sc��Connect to *address* and return the socket object. Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the socket object. Passing the optional *timeout* parameter will set the timeout on the socket instance before attempting to connect. If no *timeout* is supplied, the global default timeout setting returned by :func:`getdefaulttimeout` is used. If *source_address* is set it must be a tuple of (host, port) for the socket to bind as a source address before making the connection. A host of '' or port 0 tells the OS to use the default. i����s!���getaddrinfo returns an empty listN( ���RN���t���getaddrinfoRh���t���sockett���_GLOBAL_DEFAULT_TIMEOUTR7���R,���R-���R&���RZ���(���t���addresst���timeoutt���source_addresst���hostt���portt���errt���rest���aft���socktypeRV���t ���canonnamet���saR ���t���_(����(����s���/usr/lib64/python2.7/socket.pyR�����s(���� (<���Re���t���_sockett ���functoolsR���t���typesR���t���_sslt���ImportErrorRN���R���R ���t���sslerrorR���R���R���R���R���R���R���R���R���R���R���R���t���ost���sysR���t ���cStringIOR���t���errnoRR���R���R���t���__all__R����t���_get_exports_listR����RO���t���platformt���lowert ���startswithR ���R|���R���t���_socketmethodsR(���RP���t���objectRD���RK���Rj���t���_mt���pRG���t���mRQ���t ���SocketTypeR_���R����R���(����(����(����s���/usr/lib64/python2.7/socket.pyt���<module>-���s���� L $ , ��-