/usr/lib/python3.9/site-packages/isc/__pycache__
NameSizeModeActions
checkds.cpython-39.opt-1.pyc41760644editdlrm
checkds.cpython-39.pyc41760644editdlrm
coverage.cpython-39.opt-1.pyc63750644editdlrm
coverage.cpython-39.pyc63750644editdlrm
dnskey.cpython-39.opt-1.pyc134170644editdlrm
dnskey.cpython-39.pyc134170644editdlrm
eventlist.cpython-39.opt-1.pyc38360644editdlrm
eventlist.cpython-39.pyc38360644editdlrm
keydict.cpython-39.opt-1.pyc26130644editdlrm
keydict.cpython-39.pyc26130644editdlrm
keyevent.cpython-39.opt-1.pyc19140644editdlrm
keyevent.cpython-39.pyc19140644editdlrm
keymgr.cpython-39.opt-1.pyc41500644editdlrm
keymgr.cpython-39.pyc41500644editdlrm
keyseries.cpython-39.opt-1.pyc46690644editdlrm
keyseries.cpython-39.pyc46690644editdlrm
keyzone.cpython-39.opt-1.pyc12820644editdlrm
keyzone.cpython-39.pyc12820644editdlrm
parsetab.cpython-39.opt-1.pyc97530644editdlrm
parsetab.cpython-39.pyc97530644editdlrm
policy.cpython-39.opt-1.pyc186200644editdlrm
policy.cpython-39.pyc186200644editdlrm
rndc.cpython-39.opt-1.pyc51720644editdlrm
rndc.cpython-39.pyc51720644editdlrm
utils.cpython-39.opt-1.pyc12290644editdlrm
utils.cpython-39.pyc12290644editdlrm
__init__.cpython-39.opt-1.pyc4860644editdlrm
__init__.cpython-39.pyc4860644editdlrm
Edit: /usr/lib/python3.9/site-packages/isc/__pycache__/coverage.cpython-39.pyc (6375B)
a ŠÀªjý&ã@s¾ddlmZddlZddlZddlZddlZddlZddlZddlZddl Z ddl m Z dZ ddl mZmZmZmZmZmZdd„Zdad d „Zd d „Zd d„Zddd„Zdd„Zdd„ZdS)é)Úprint_functionN)Ú defaultdictzdnssec-coverage)ÚdnskeyÚ eventlistÚkeydictÚkeyeventÚkeyzoneÚutilscOst|i|¤Žt d¡dS)Né)ÚprintÚsysÚexit)ÚargsÚkwargs©rú0/usr/lib/python3.9/site-packages/isc/coverage.pyÚfatalsrTcOsNd|vr|d}| dd¡nd}tr,dan |r8tdƒ|rJt|i|¤ŽdS)zuoutput text, adding a vertical space this is *not* the first first section being printed since a call to vreset()ÚskipNTFÚ)ÚpopÚ _firstliner )rrrrrrÚoutput'srcCsdadS)zreset vertical spacingTN)rrrrrÚvreset8srcCsð| ¡}z t|ƒWSty$Yn0t d¡}| |¡}|sJtd|ƒ‚| ¡\}}t|ƒ}| ¡}| d¡rx|dS| d¡rŠ|dS| d¡rœ|dS| d ¡r®|d S| d ¡rÀ|d S| d ¡rÒ|dS| d¡rà|Std|ƒ‚dS)zÌ convert a formatted time (e.g., 1y, 6mo, 15mi, etc) into seconds :param s: String with some text representing a time interval :return: Integer with the number of seconds in the time interval z([0-9][0-9]*)\s*([A-Za-z]*)zCannot parse %sÚyi€3áÚmoi�'Úwé€: Údi€QÚhiÚmié<ÚszInvalid suffix %sN) ÚstripÚintÚ ValueErrorÚreÚcompileÚmatchÚgroupsÚlowerÚ startswith)r!ÚrÚmÚnZunitrrrÚ parse_timeAs6             r.cCs~|}|r"tj |¡r"t |tj¡sztjd}|s8tjj}| tj¡D]4}tj  ||¡}tj |¡rtt |tj¡rtqzd}qD|S)a1 find the location of a specified command. if a default is supplied and it works, we use it; otherwise we search PATH for a match. :param command: string with a command to look for in the path :param default: default location to use :return: detected location for the desired command ÚPATHN) ÚosÚpathÚisfileÚaccessÚX_OKÚenvironÚdefpathÚsplitÚpathsepÚjoin)ZcommandÚdefaultZfpathr1Z directoryrrrÚset_pathks r;c Cs>tdtj t d¡d¡ƒ}tjtddd�}|j dt ddd d �|j d d d t ddd�|j ddt ddd�|j ddt ddd�|j ddt ddd�|j dddt d dd�|j d!d"|t d#d d�|j d$d%t d&d'dd(�|j d)d*d+d,d-d.�|j d/d0d+d,d1d.�|j d2d3d4d+d,d5d.�|j d6d7d8tj d9�|  ¡}|j �rJ|j�rJtd:ƒn*|j �sZ|j�rn|j �rfd;nd<|_nd|_|j�r”t|jƒd=k�r”td>ƒd?d@„|jDƒ|_z|j�rÀt|jƒ}||_Wnt�yÖYn0z|j�ròt|jƒ}||_Wnt�yYn0z|j�r$t|jƒ}||_Wnt�y:Yn0z<|j�rv|j}t|jƒ}|dAk�rhd|_nt ¡||_Wnt�yŒYn0|j�r¢|j�r¢|S|j�r$|j�r$z:t|jdA|j|jƒ}|j�pÖ|j|_|j�pæ|j|_Wn6t�y"}ztdB|j|ƒWYd}~n d}~00|j�s:tdCƒdD|_|S)Ez8Read command line arguments, set global 'args' structureznamed-compilezoneZsbinz: checks future zDNSKEY coverage for a zone)Ú descriptionÚzoneÚ*Nz5zone(s) to check(default: all zones in the directory))ÚtypeÚnargsr:Úhelpz-Kr1Ú.z&a directory containing keys to processÚdir)Údestr:r?rAÚmetavarz-fÚfilenamezzone master fileÚfile)rDr?rArEz-mÚmaxttlzthe longest TTL in the zone(s)Útimez-dÚkeyttlzthe DNSKEY TTLz-rÚresignZ1944000z:the RRSIG refresh interval in seconds [default: 22.5 days]z-cÚ compilezonezpath to 'named-compilezone'z-lÚ checklimitÚ0zDLength of time to check for DNSSEC coverage [default: 0 (unlimited)])rDr?r:rArEz-zÚno_kskÚ store_trueFz#Only check zone-signing keys (ZSKs))rDÚactionr:rAz-kÚno_zskz"Only check key-signing keys (KSKs)z-Dz--debugZ debug_modezTurn on debugging outputz-vz --versionÚversion)rQrSz)ERROR: -z and -k cannot be used together.ZKSKZZSKr z)ERROR: -f can only be used with one zone.cSs4g|],}t|ƒdkr,|ddkr,|dd…n|‘qS)r éÿÿÿÿrBN)Úlen)Ú.0ÚxrrrÚ Àsÿzparse_args..rz"Unable to load zone data from %s: z‰WARNING: Maximum TTL value was not specified. Using 1 week (604800 seconds); re-run with the -m option to get more accurate results.r) r;r0r1r9r ÚprefixÚargparseÚArgumentParserÚprogÚ add_argumentÚstrrSÚ parse_argsrRrOrÚkeytyperFrUr=rHr.r$rJrKrMrIrrLÚ Exceptionr r) rLÚparserrr,Úkr+Zlimr=Úerrrr_„sÒÿÿ ÿ ÿ þ ÿ þ ÿ ýýüþþ þ ÿ ÿ        &r_c Csltƒ}tdƒzt|j|j|jd�}Wn4tyZ}ztdt|ƒƒWYd}~n d}~00|D]4}|  t ¡|j r€|  t ¡q`|  t |j |j¡q`t dƒtƒz t|ƒ}Wn4tyä}ztdt|ƒƒWYd}~n d}~00d}|j�s| d|j|jt ¡�sTd}nF|jD]>}z| ||j|jt ¡�s4d}Wnt d|ƒYn0�qt |�rbd nd ¡dS) Nz;PHASE 1--Loading keys to check for internal timing problems)r1ZzonesrJz'ERROR: Unable to build key dictionary: z9PHASE 2--Scanning future key events for coverage failuresz#ERROR: Unable to build event list: FTz&ERROR: Coverage check failed for zone r r)r_r rr1r=rJrarr^Z check_prepubrÚsepZ check_postpubrHrKrrZcoverager`rMr r )rZkdrdÚkeyZelistÚerrorsr=rrrÚmainüs<&   &  ÿrh)N)Z __future__rr0r rZÚglobr%rIZcalendarZpprintÚ collectionsrr\Ziscrrrrrr rrrrr.r;r_rhrrrrÚ s&    * x