ROOTPLOIT
Server: LiteSpeed
System: Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User: niphet (1079)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: //lib/python3.6/site-packages/isc/__pycache__/keymgr.cpython-36.pyc
3

Pik@sddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZdZddl
mZmZmZmZmZmZddZddd	Zd
dZdd
ZdS))print_functionN)defaultdictz
dnssec-keymgr)dnskeykeydict	keyseriespolicyparsetabutilscOst||tjddS)N)printsysexit)argskwargsr/usr/lib/python3.6/keymgr.pyfatals
rcCs|}|s(tjj|s(tj|tjrtjd}|s>tjj}xB|jtjD]2}|tj	|}tjj|rztj|tjrzPd}qLW|S)a2 find the location of a specified command. If a default is supplied,
    exists and it's an executable, we use it; otherwise we search PATH
    for an alternative.
    :param command: command to look for
    :param default: default value to use
    :return: PATH with the location of a suitable binary
    PATHN)
ospathisfileaccessX_OKenvirondefpathsplitpathsepsep)ZcommanddefaultZfpathrZ	directoryrrrset_paths$
rcCstdtjjtjdd}tdtjjtjdd}tjtdd}|j	dt
ddd;d|j	dd
t
ddd|j	ddt
ddd|j	dd|t
dd
d|j	ddt
ddd
d|j	dd|t
dd
d|j	d d!d"d#d$d%|j	d&d'd"d#d(d%|j	d)d*d+d"d#d<d%|j	d.d/d0d"d#d1d%|j	d2d3d4tjd5|j}|j
rJ|jrJtd6|jdkr^td7|jdkrrtd8|jdk	rtjj|jstd9|jn(tjjtjd:|_tjj|jsd|_|S)=zc Read command line arguments, returns 'args' object
    :return: args object properly prepared
    z
dnssec-keygenZsbinzdnssec-settimezA: schedule DNSSEC key rollovers according to a pre-defined policy)descriptionzone*Nz.Zone(s) to which the policy should be applied z%(default: all zones in the directory))typenargsrhelpz-KrzDirectory containing keysdir)destr#r%metavarz-c
policyfilezPolicy definition filefilez-gkeygenzPath to 'dnssec-keygen')r'rr#r%r(z-r	randomdevz@Path to a file containing random data to pass to 'dnssec-keygen')r'r#rr%r(z-ssettimezPath to 'dnssec-settime'z-kno_zsk
store_trueFz,Only apply policy to key-signing keys (KSKs))r'actionrr%z-zno_kskz-Only apply policy to zone-signing keys (ZSKs)z-fz--forceforcezForce updates to key events zeven if they are in the pastz-qz--quietquietzUpdate keys silentlyz-vz	--versionversion)r0r4z)ERROR: -z and -k cannot be used together.zERROR: dnssec-keygen not foundzERROR: dnssec-settime not foundz!ERROR: Policy file "%s" not foundzdnssec-policy.confzSZone(s) to which the policy should be applied (default: all zones in the directory)z8Force updates to key events even if they are in the past)rrrjoinr	prefixargparseArgumentParserprogadd_argumentstrr4
parse_argsr.r1rr+r-r)existsZ
sysconfdir)r+r-parserrrrrr<6sb







r<c:CsHt}|j|j|j|jd}ytj|j}Wn2tk
r^}zt	dt
|WYdd}~XnXyt||j|jd}Wn2tk
r}zt	dt
|WYdd}~XnXyt
||d}Wn2tk
r}zt	dt
|WYdd}~XnXy |j||j|j|j|jdWn4tk
rB}zt	dt
|WYdd}~XnXdS)	N)Zkeygen_pathZsettime_pathZ	keys_pathr,zUnable to load DNSSEC policy: )rZzonesz Unable to build key dictionary: )contextzUnable to build key series: )ZkskZzskr2r3zUnable to apply policy: )r<r+r-rr,rZ
dnssec_policyr)	Exceptionrr;rr!rZenforce_policyr.r1r2r3)rr?ZdpeZkdZksrrrmain}s,
"""rB)N)Z
__future__rrrr7ZglobreZtimeZcalendarpprintcollectionsrr9Ziscrrrrrr	rrr<rBrrrr<module>s@ 
G