ok

Mini Shell

Direktori : /proc/self/root/proc/self/root/proc/thread-self/root/lib/python2.7/site-packages/isc/
Upload File :
Current File : //proc/self/root/proc/self/root/proc/thread-self/root/lib/python2.7/site-packages/isc/coverage.pyc

�
���cc@sddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZdZddl
mZmZmZmZmZmZd�Zead�Zd�Zd	�Zdd
�Zd�Zd�ZdS(
i����(tprint_functionN(tdefaultdictsdnssec-coverage(tdnskeyt	eventlisttkeydicttkeyeventtkeyzonetutilscOst||�tjd�dS(Ni(tprinttsystexit(targstkwargs((s0/usr/lib/python2.7/site-packages/isc/coverage.pytfatals
cOskd|kr)|d}|jdd�nt}tr>tan|rQtd�n|rgt||�ndS(suoutput text, adding a vertical space this is *not* the first
    first section being printed since a call to vreset()tskiptN(tpoptNonetTruet
_firstlinetFalseR(RRR((s0/usr/lib/python2.7/site-packages/isc/coverage.pytoutput's
	
cCs
tadS(sreset vertical spacingN(RR(((s0/usr/lib/python2.7/site-packages/isc/coverage.pytvreset8scCs@|j�}yt|�SWntk
r-nXtjd�}|j|�}|setd|��n|j�\}}t|�}|j�}|jd�r�|dS|jd�r�|dS|jd�r�|dS|jd	�r�|d
S|jd�r|dS|jd
�r|dS|jd�r,|Std|��dS(s� 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
    s([0-9][0-9]*)\s*([A-Za-z]*)sCannot parse %styi�3�tmoi�'twi�:	tdi�Qthitmii<tssInvalid suffix %sN(	tstriptintt
ValueErrortretcompiletmatchtgroupstlowert
startswith(Rtrtmtntunit((s0/usr/lib/python2.7/site-packages/isc/coverage.pyt
parse_timeAs6
cCs�|}|s6tjj|�s6tj|tj�r�tjd}|sXtjj}nxc|jtj�D]L}tjj	||�}tjj|�r�tj|tj�r�Pnd}qkWn|S(s1 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
    tPATHN(tostpathtisfiletaccesstX_OKtenvirontdefpathtsplittpathseptjoinR(tcommandtdefaulttfpathR.t	directory((s0/usr/lib/python2.7/site-packages/isc/coverage.pytset_pathks0
'
c	Cs�tdtjjtjd�d��}tjdtdd�}|j	ddt
dd	d
dCddd
�|j	dddd
ddt
dddd�|j	ddddt
dddd�|j	ddddt
dddd�|j	ddddt
dddd�|j	d dd!d
d"dt
dd#dd�|j	d$dd%d
|dt
dd&dd�|j	d'dd(dt
d
d)dd*dd�|j	d+dd,d-d.d
tdd/�|j	d0dd1d-d.d
tdd2�|j	d3d4dd5d-d.d
tdd6�|j	d7d8d-d9d9tj
�|j�}|jrA|jrAtd:�n6|jsS|jrn|jrbd;nd<|_n	dC|_|jr�t|j�d=kr�td>�ny(|jr�t|j�}||_nWntk
r�nXy(|jrt|j�}||_nWntk
rnXy(|jrAt|j�}||_nWntk
rUnXyS|jr�|j}t|j�}|d?kr�dC|_q�tj�||_nWntk
r�nX|jr�|jr�|S|jr_|jr_yMt|jd?|j|j�}|jp|j|_|jp+|j|_Wq_tk
r[}t d@|j|�q_Xn|js~t!dA�dB|_n|S(Ds8Read command line arguments, set global 'args' structuresnamed-compilezonetsbintdescriptions: checks future sDNSKEY coverage for a zonetzonettypetnargst*R8thelpszone(s) to checks%(default: all zones in the directory)s-KtdestR.t.s&a directory containing keys to processtmetavartdirs-ftfilenameszone master filetfiles-mtmaxttlsthe longest TTL in the zone(s)ttimes-dtkeyttlsthe DNSKEY TTLs-rtresignt1944000s:the RRSIG refresh interval in seconds [default: 22.5 days]s-ctcompilezonespath to 'named-compilezone's-lt
checklimitt0sDLength of time to check for DNSSEC coverage [default: 0 (unlimited)]s-ztno_ksktactiont
store_trues#Only check zone-signing keys (ZSKs)s-ktno_zsks"Only check key-signing keys (KSKs)s-Ds--debugt
debug_modesTurn on debugging outputs-vs	--versiontversions)ERROR: -z and -k cannot be used together.tKSKtZSKis)ERROR: -f can only be used with one zone.is"Unable to load zone data from %s: s�WARNING: Maximum TTL value was not specified.  Using 1 week
	 (604800 seconds); re-run with the -m option to get more
	 accurate results.i�:	N("R;R-R.R6RtprefixtargparsetArgumentParsertprogtadd_argumenttstrRRRVt
parse_argsRTRQR
tkeytypeRGtlenR>RIR+R RKRLRORJRRNt	ExceptionRR(	RNtparserRR(tkR'tlimR>te((s0/usr/lib/python2.7/site-packages/isc/coverage.pyR_�s�




	
	
	
	
		
	
cCs�t�}td�y(td|jd|jd|j�}Wn'tk
rd}tdt|��nXxN|D]F}|j	t
�|jr�|jt
�ql|jt
|j
|j�qlWt
d�t�yt|�}Wn'tk
r}tdt|��nXt}|js:|jd|j|jt
�s�t}q�nWxT|jD]I}y+|j||j|jt
�stt}nWqDt
d|�qDXqDWtj|r�d	nd
�dS(Ns;PHASE 1--Loading keys to check for internal timing problemsR.R>RKs'ERROR: Unable to build key dictionary: s9PHASE 2--Scanning future key events for coverage failuress#ERROR: Unable to build event list: s&ERROR: Coverage check failed for zone ii(R_RRR.R>RKRbR
R^tcheck_prepubRtsept
check_postpubRIRLRRRtcoverageRR`RORR	R
(RtkdRftkeytelistterrorsR>((s0/usr/lib/python2.7/site-packages/isc/coverage.pytmain�s:	
(

	
	
(t
__future__RR-R	RZtglobR!RJtcalendartpprinttcollectionsRR\tiscRRRRRRR
RRRRR+RR;R_Ro(((s0/usr/lib/python2.7/site-packages/isc/coverage.pyt<module>s&.					*	t

Zerion Mini Shell 1.0