%PDF- %PDF-
Direktori : /lib/python3/dist-packages/netaddr/ip/__pycache__/ |
Current File : //lib/python3/dist-packages/netaddr/ip/__pycache__/nmap.cpython-312.pyc |
� ӊ�^� � �V � d Z ddlmZ ddlmZmZ ddlmZmZm Z d� Z d� Zd� Zd� Z d � Zy )z� Routines for dealing with nmap-style IPv4 address ranges. Based on nmap's Target Specification :- http://nmap.org/book/man-target-specification.html � )�AddrFormatError)� IPAddress� IPNetwork)�_iter_range�_is_str� _iter_nextc � � t � }| j d� D ]� }d|v r�|j dd� \ }}|sd}|sd}t |� }t |� }d|cxk rdk rn n d|cxk rdk sn t d| �d�� �||kD rt d|��� �t ||dz � D ] }|j |� � ��t |� }d|cxk rdk sn t d| �d�� �|j |� �� t |� S ) N�,�-� r � zoctet value overflow for spec �!z%left side of hyphen must be <= right )�set�split�int� ValueErrorr �add�sorted)�spec�values�element�left�right�low�high�octets �1/usr/lib/python3/dist-packages/netaddr/ip/nmap.py�_nmap_octet_target_valuesr s� � � �U�F��:�:�c�?� ���'�>�!�-�-��Q�/�K�D�%��������d�)�C��u�:�D��#�_��_�1��+;��+;� ��!N�O�O��T�z� �g�!W�X�X�$�S�$��(�3� "��� � �5�!� "� ��L�E���%�#�%� ��!N�O�O��J�J�u��'�* �&�>�� c �& � t | � st dt | � z � �| st d� �| j d� }t |� dk7 rt d| ��� �t |d � t |d � t |d � t |d � fS ) Nzstring expected, not %sz*nmap target specification cannot be blank!�.� zinvalid nmap range: r r � � )r � TypeError�typer r �lenr r )�nmap_target_spec�tokenss r �_generate_nmap_octet_rangesr* 0 s� � � �#�$��1�D�9I�4J�J�K�K���E�F�F� � #� #�C� (�F� �6�{�a���:J�L�M�M�%�f�Q�i�0�%�f�Q�i�0�%�f�Q�i�0�%�f�Q�i�0�2� 2r c # � K � d| v rj| j dd� \ }}dt |� cxk rdk sn t d|��� �t | � }|j dk7 rt d� �|D ] }|�� � y d| v rt | � �� y t | � }|d D ]5 }|d D ]+ }|d D ]! }|d D ] } t d|||| fz d� �� � �# �- �7 y �w)N�/r r �! zCIDR prefix expected, not r"