Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /usr/share/authconfig/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/authconfig/dnsclient.pyc
�
�8�Yc@s�ddlZddlZddlZddlZdZdZdZdZdZdZ	dZ
dZdZd	Z
d
ZdZdZd
ZdZdZdZeZdd,d��YZd�Zdd-d��YZdd.d��YZd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d �Z$d!�Z%d"�Z&d#�Z'd$�Z(d%�Z)d&�Z*d'�Z+e,d(kr�e-Zd)GHe+e.ej/�dkr�ej/dp�d*ee�Z0ej1d+�ndS(/i����Niiiii�iii
iii
iii!tDNSQueryHeadercBs2eZdZd�Zd�Zd�Zd�ZRS(s!HBBHHHHcCsyd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_dS(Ni(
tdns_idtdns_rdtdns_tctdns_aat
dns_opcodetdns_qrt	dns_rcodetdns_ztdns_ratdns_qdcounttdns_ancounttdns_nscounttdns_arcount(tself((s"/usr/share/authconfig/dnsclient.pyt__init__/s												c	Cs�tjtj|j|jd@|jd@d>B|jd@d>B|jd@d>B|j	d@d>B|j
d@|jd@d>B|jd@d>B|j
|j|j|j�S(Niiiiii(tstructtpackRtFORMATRRRRRRRRR	R
RRR
(R((s"/usr/share/authconfig/dnsclient.pyR>s7cCs�tjtj|d|j�!�\|_}}|_|_|_|_	|d@|_
|d?d@|_|d?d@|_|d?d@|_
|d?d@|_|d@|_|d?d@|_|d?d@|_dS(Niiiiiii(RtunpackRRtsizeRR
RRR
RRRRRRRR	(Rtdatatbyte1tbyte2((s"/usr/share/authconfig/dnsclient.pyRNsF

cCstjtj�S(N(RtcalcsizeRR(R((s"/usr/share/authconfig/dnsclient.pyRZs(t__name__t
__module__RRRRR(((s"/usr/share/authconfig/dnsclient.pyR-s
			cCst�}|j|�|S(N(RR(Rtheader((s"/usr/share/authconfig/dnsclient.pytunpackQueryHeader]s	
t	DNSResultcBsAeZdZdZd�Zd�Zd�Zd�Zd�ZRS(s!HHIHs!HHcCs:d|_d|_d|_d|_d|_d|_dS(Nti(tdns_nametdns_typet	dns_classtdns_ttltdns_rlengthtNonetrdata(R((s"/usr/share/authconfig/dnsclient.pyRes					cCs>tjtj|d|j�!�\|_|_|_|_dS(Ni(	RRRRRR R!R"R#(RR((s"/usr/share/authconfig/dnsclient.pyRmscCs2tjtj|d|j�!�\|_|_dS(Ni(RRRtQFORMATtqsizeR R!(RR((s"/usr/share/authconfig/dnsclient.pytqunpackqscCstjtj�S(N(RRRR(R((s"/usr/share/authconfig/dnsclient.pyRtscCstjtj�S(N(RRRR&(R((s"/usr/share/authconfig/dnsclient.pyR'ws(	RRRR&RRR(RR'(((s"/usr/share/authconfig/dnsclient.pyRbs				tDNSRDatacBseZd�ZRS(cCsdS(N((R((s"/usr/share/authconfig/dnsclient.pyR{s(RRR(((s"/usr/share/authconfig/dnsclient.pyR)zscCsDd}|jd�}x(|D] }|tt|��|7}qW|S(NRt.(tsplittchrtlen(tnametouttpart((s"/usr/share/authconfig/dnsclient.pytdnsNameToLabel�s

cCs�t�}d|_d|_d|_d|_d|_t|�}|sLdS|j�|}|t|d?�7}|t|d@�7}|t|d?�7}|t|d@�7}|S(NiiRii�(	RRRRRR
R1RR,(tquerytqclasstqtypeRtqlabelR/((s"/usr/share/authconfig/dnsclient.pytdnsFormatQuery�s						cCs|s
d	Sd}|}d}d}y�x�t|d�r�t|d�d@r�|t|d�d@d>t|d�}|r�|d7}nd}q(n||dt|d�d!d7}|r�|t|d�d7}n|t|d�d}q(WWntk
r
d
SX||||fS(NRiii�i?iiR*(RN(RN(R$tordt
IndexError(tlabeltbasetupdatetresttoutputtskip((s"/usr/share/authconfig/dnsclient.pyt
dnsParseLabel�s**
# 
cCs�t�}t|�dkr(d|_dSt|d�d>t|d�d>Bt|d�d>Bt|d�d>B|_tr�d	t|d�t|d�t|d�t|d�fGHn|S(
NiiiiiiiisA = %d.%d.%d.%d.(R)R-taddressR$R7tDEBUG_DNSCLIENT(RR:R%((s"/usr/share/authconfig/dnsclient.pyt	dnsParseA�s		M@cCs]t|�dkrdSt|d�}t|�|dkr@dS||d|d|d!fS(NiRi(RN(RN(R-R$R7(Rttlen((s"/usr/share/authconfig/dnsclient.pytdnsParseText�scCs:t�}t||�\}|_tr6d|jGHn|S(NsNS DNAME = "%s".(R)R?tnsdnameRA(RR:R%R<((s"/usr/share/authconfig/dnsclient.pyt
dnsParseNS�s
	cCs:t�}t||�\}|_tr6d|jGHn|S(Ns
CNAME = "%s".(R)R?tcnameRA(RR:R%R<((s"/usr/share/authconfig/dnsclient.pyt
dnsParseCNAMEs
	cCs"t�}d}t||�\}|_|jdkr:dSt||�\}|_|jdkredSt|�tj|�kr�dStj||tj|� �\|_	|_
|_|_|_
trd|jGHd|jGHd|j	GHd|j
GHd|jGHd|jGHd|j
GHn|S(	Ns!IIIIIsSOA(mname) = "%s".sSOA(rname) = "%s".sSOA(serial) = %d.sSOA(refresh) = %d.sSOA(retry) = %d.sSOA(expire) = %d.sSOA(minimum) = %d.(R)R?tmnameR$trnameR-RRRtserialtrefreshtretrytexpiretminimumRA(RR:R%tformatR<((s"/usr/share/authconfig/dnsclient.pytdnsParseSOAs(	=cCsdS(N(R$(RR:((s"/usr/share/authconfig/dnsclient.pytdnsParseNULL"scCsdS(N(R$(RR:((s"/usr/share/authconfig/dnsclient.pytdnsParseWKS&scCsat�}t|�\}|_|r<t|�\}|_ntr]d|jGHd|jGHn|S(NsHINFO(cpu) = "%s".sHINFO(os) = "%s".(R)RDtcputosRA(RR:R%R<((s"/usr/share/authconfig/dnsclient.pyt
dnsParseHINFO)s	cCs�t�}t|�dkrdSt|d�d>t|d�B|_t|d|�\}|_tr�d|jGHd|jGHn|S(NiiiisMX(exchanger) = "%s".sMX(preference) = %d.(R)R-R$R7t
preferenceR?texchangeRA(RR:R%R<((s"/usr/share/authconfig/dnsclient.pyt
dnsParseMX3s	%cCs7t�}t|�\}|_tr3d|jGHn|S(NsTXT = "%s".(R)RDRRA(RR:R%R<((s"/usr/share/authconfig/dnsclient.pytdnsParseTXT>s
	cCs:t�}t||�\}|_tr6d|jGHndS(NsPTR = "%s".(R)R?tptrdnameRA(RR:R%R<((s"/usr/share/authconfig/dnsclient.pytdnsParsePTREs	cCs�t�}d}tj|�}t|�|kr4dStj||| �\|_|_|_t	|||�\}|_
tr�d|j
GHd|jGHd|jGHd|jGHn|S(Ns!HHHsSRV(server) = "%s".sSRV(weight) = %d.sSRV(priority) = %d.sSRV(port) = %d.(R)RRR-R$RtprioritytweighttportR?tserverRA(RR:R%RPtflenR<((s"/usr/share/authconfig/dnsclient.pytdnsParseSRVKs	(cCs�yt|�}Wntjk
r'gSX|jdkr;gS|jdkrNgS||j�}g}x�t|j�D]�}|s�gSt�}t	||�\}}|dkr�gSt|�|j�kr�gS|j
|�||j�}trtd||j|jfGHqtqtWx�t|j|j|j�D]~}t	||�\}}|dkrYgSt�}||_t|�|j�kr�gS|j|�||j�}tr�d||j|j|j|jfGHnt|�|jkr�tr�dGHngSitt6tt6tt6tt6t t!6t"t#6t$t%6t&t'6t(t)6t*t+6t,t-6}|j|krrtr�d|jGHq�n ||j||j |�|_.||j}||g7}q.W|s�|g}n|S(Niis(Queried for '%s', class = %d, type = %d.s4Answer %d for '%s', class = %d, type = %d, ttl = %d.sAnswer too short.s#Don't know how to parse RR type %d!(/RRterrorRRRtxrangeR
RR?R$R-R'R(RAR!R RRR
RRR"R#RBtDNS_T_ARFtDNS_T_NSRHtDNS_T_CNAMERQt	DNS_T_SOARRt
DNS_T_NULLRSt	DNS_T_WKSR\t	DNS_T_PTRRVtDNS_T_HINFORYtDNS_T_MXRZt	DNS_T_TXTRbt	DNS_T_SRVR%(tresultsRR<trrlisttitrrR9tfmap((s"/usr/share/authconfig/dnsclient.pytdnsParseResults[sr	
$		

 
cCs?t|||�}|sgStj|�}|s5gSt|�S(N(R6tacutiltres_sendRu(R2R3R4tqdatatanswer((s"/usr/share/authconfig/dnsclient.pyR2�st__main__sSending query.sdevserv.devel.redhat.com.i((((2RtsockettsysRvtDNS_C_INtDNS_C_CStDNS_C_CHAOStDNS_C_HSt	DNS_C_ANYReRfRgRhRiRjRkRlRmRnRot	DNS_T_ANYtFalseRARRRR)R1R6R?RBRDRFRHRQRRRSRVRYRZR\RbRuR2RtTrueR-targvRstexit(((s"/usr/share/authconfig/dnsclient.pyt<module>s`0	6											
					S		(

ZeroDay Forums Mini