관리-도구
편집 파일: NSEC3.pyc
� -=Pc @ s� d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z e j d d � Z e j d d � Z d Z d Z d e j j f d � � YZ d S( i����Nt 0123456789ABCDEFGHIJKLMNOPQRSTUVt ABCDEFGHIJKLMNOPQRSTUVWXYZ234567i t NSEC3c B s� e Z d Z d d d d d d g Z d � Z d e d � Z d e d � Z e e � Z d d d � Z d d � Z e e � Z d � Z RS( s� NSEC3 record @ivar algorithm: the hash algorithm number @type algorithm: int @ivar flags: the flags @type flags: int @ivar iterations: the number of iterations @type iterations: int @ivar salt: the salt @type salt: string @ivar next: the next name hash @type next: string @ivar windows: the windowed bitmap list @type windows: list of (window number, string) tuplest algorithmt flagst iterationst saltt nextt windowsc C sS t t | � j | | � | | _ | | _ | | _ | | _ | | _ | | _ d S( N( t superR t __init__R R R R R R ( t selft rdclasst rdtypeR R R R R R ( ( s; /usr/lib64/python2.7/site-packages/dns/rdtypes/ANY/NSEC3.pyR 6 s c K s/ t j | j � j t � j � } | j d k r9 d } n | j j d � } d } x� | j D]� \ } } g } x� t d t | � � D]j } t | | � } xQ t d d � D]@ } | d | ?@r� | j t j j | d | d | � � q� q� Wq� W| d d j | � 7} q[ Wd | j | j | j | | | f S( Nt t -s hex-codeci i i� i t s %u %u %u %s %s%s( t base64t b32encodeR t translatet b32_normal_to_hext lowerR t encodeR t xranget lent ordt appendt dnst rdatatypet to_textt joinR R R ( R t origint relativizet kwR R t textt windowt bitmapt bitst it bytet j( ( s; /usr/lib64/python2.7/site-packages/dns/rdtypes/ANY/NSEC3.pyR @ s ! %c C sb | j � } | j � } | j � } | j � } | d k rE d } n | j d � } | j � j � j t � } t j | � } g } x� | j � j � } | j � r� Pn t j j | j � } | d k r� t j j d � � n | d k r t j j d � � n | j | � q� W| j � d } d } d } d g d } g } x� | D]� } | | k r_qGn | } | d } | | k r�| d k r�| j | d j | d | !� f � n d g d } | } n | d } | d } | d } | d } t t | | � d | ?B� | | <qGW| d k rC| j | d j | d | !� f � n | | | | | | | | | � S( NR R s hex-codeci s NSEC3 with bit 0i�� s NSEC3 with bit > 65535s i i i i i� ( t get_uint8t get_uint16t get_stringt decodet upperR t b32_hex_to_normalR t b32decodet gett unescapet is_eol_or_eofR R t from_textt valuet exceptiont SyntaxErrorR t sortR t chrR ( t clsR R t tokR R R R R R R t rdtypest tokent nrdtypeR# t octetst prior_rdtypeR$ R t new_windowt offsetR'