Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : fdshops ( 1003)
PHP Version : 8.2.21
Disable Function : NONE
Directory :  /lib/python2.7/site-packages/dns/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/dns/query.pyc
�
ꉃYc@s�dZddlmZddlZddlZddlZddlZddlZddlZddl	Z
ddlZ
ddlZ
ddl
Z
ddlZ
ddlZ
de
jjfd��YZde
jjfd��YZd�Zd	�Zd
�Zd�Zd�Zeed
�r#eanead�Zd�Zd�Zd�Zddddde!e!d�Z"d�Z#d�Z$d�Z%ddddde!d�Z&e
j'j(e
j)j*dddde+ddddde!e
j,j-d�Z.dS(sTalk to a DNS server.i����(t
generatorsNtUnexpectedSourcecBseZdZRS(s=A DNS query response came from an unexpected address or port.(t__name__t
__module__t__doc__(((s-/usr/lib/python2.7/site-packages/dns/query.pyR"stBadResponsecBseZdZRS(s<A DNS query response does not respond to the question asked.(RRR(((s-/usr/lib/python2.7/site-packages/dns/query.pyR%scCs"|dkrdStj�|SdS(N(tNonettime(ttimeout((s-/usr/lib/python2.7/site-packages/dns/query.pyt_compute_expiration(scCs�d}|r|tjO}n|r2|tjO}n|rH|tjO}ntj�}|j||�|r�|jt|d��}n|j�}t|�S(sqPoll polling backend.
    @param fd: File descriptor
    @type fd: int
    @param readable: Whether to wait for readability
    @type readable: bool
    @param writable: Whether to wait for writability
    @type writable: bool
    @param timeout: Deadline timeout (expiration time, in seconds)
    @type timeout: float
    @return True on success, False on timeout
    ii�(tselecttPOLLINtPOLLOUTtPOLLERRtpolltregistertlongtbool(tfdtreadabletwritableterrorRt
event_masktpollablet
event_list((s-/usr/lib/python2.7/site-packages/dns/query.pyt	_poll_for.scCs�ggg}}}|r&|g}n|r8|g}n|rJ|g}n|dkrwtj|||�\}}	}
n!tj||||�\}}	}
t|p�|	p�|
�S(ssSelect polling backend.
    @param fd: File descriptor
    @type fd: int
    @param readable: Whether to wait for readability
    @type readable: bool
    @param writable: Whether to wait for writability
    @type writable: bool
    @param timeout: Deadline timeout (expiration time, in seconds)
    @type timeout: float
    @return True on success, False on timeout
    N(RR
R(RRRRRtrsettwsettxsettrcounttwcounttxcount((s-/usr/lib/python2.7/site-packages/dns/query.pyt_select_forLs!!cCs�t}x�|s�|dkr$d}n+|tj�}|dkrOtjj�ny+t|||||�sytjj�nWn5tjk
r�}|j	dt
jkr�|�q�nXt}q	WdS(Ngi(
tFalseRRtdnst	exceptiontTimeoutt_polling_backendR
RtargsterrnotEINTRtTrue(RRRRt
expirationtdoneRte((s-/usr/lib/python2.7/site-packages/dns/query.pyt	_wait_forhs		
cCs
|adS(s#
    Internal API. Do not use.
    N(R%(tfn((s-/usr/lib/python2.7/site-packages/dns/query.pyt_set_polling_backendysRcCst|ttt|�dS(N(R-R)R!(tsR*((s-/usr/lib/python2.7/site-packages/dns/query.pyt_wait_for_readable�scCst|ttt|�dS(N(R-R!R)(R0R*((s-/usr/lib/python2.7/site-packages/dns/query.pyt_wait_for_writable�scCsPtjj||d�}tjj||d�}||koO|d|dkS(Nii(R"tinett	inet_pton(tafta1ta2tn1tn2((s-/usr/lib/python2.7/site-packages/dns/query.pyt_addresses_equal�scCs|dkr;ytjj|�}Wq;tjj}q;Xn|tjjkr�||f}|dk	sq|dkr|dkr�d}n||f}qni|tjjkr||ddf}|dk	s�|dkr|dkr�d}n||ddf}qn|||fS(Nis0.0.0.0s::(RR"R3taf_for_addresstAF_INETtAF_INET6(R5twheretporttsourcetsource_porttdestination((s-/usr/lib/python2.7/site-packages/dns/query.pyt_destination_and_source�s$		i5ic	Cs�|j�}	t|||||�\}}
}tj|tjd�}d}z�t|�}
|jd�|dk	r�|j|�nt||
�t	j	�}|j
|	|
�x�t||
�|jd�\}	}t
|||
�s	tjj|�r
|d|
dkr
Pn|s�td||
f��q�q�Wd|dkrHd}nt	j	�|}|j�Xtjj|	d|jd|jd|�}||_	|j|�s�t�n|S(	s�Return the response obtained after sending a query via UDP.

    @param q: the query
    @type q: dns.message.Message
    @param where: where to send the message
    @type where: string containing an IPv4 or IPv6 address
    @param timeout: The number of seconds to wait before the query times out.
    If None, the default, wait forever.
    @type timeout: float
    @param port: The port to which to send the message.  The default is 53.
    @type port: int
    @param af: the address family to use.  The default is None, which
    causes the address family to use to be inferred from the form of of where.
    If the inference attempt fails, AF_INET is used.
    @type af: int
    @rtype: dns.message.Message object
    @param source: source address.  The default is the wildcard address.
    @type source: string
    @param source_port: The port from which to send the message.
    The default is 0.
    @type source_port: int
    @param ignore_unexpected: If True, ignore responses from unexpected
    sources.  The default is False.
    @type ignore_unexpected: bool
    @param one_rr_per_rrset: Put each RR into its own RRset
    @type one_rr_per_rrset: bool
    ii��is$got a response from %s instead of %sNtkeyringtrequest_mactone_rr_per_rrset(tto_wireRCtsockett
SOCK_DGRAMRR	tsetblockingtbindR2RtsendtoR1trecvfromR:R"R3tis_multicastRtclosetmessaget	from_wireRDtmactis_responseR(tqR>RR?R5R@RAtignore_unexpectedRFtwireRBR0t
begin_timeR*tfrom_addresst
response_timetr((s-/usr/lib/python2.7/site-packages/dns/query.pytudp�sD


	!			cCshd}x[|dkrct||�|j|�}|dkrFt�n|t|�}||}q	W|S(s�Read the specified number of bytes from sock.  Keep trying until we
    either get the desired amount, or we hit EOF.
    A Timeout exception will be raised if the operation is not completed
    by the expiration time.
    ti(R1trecvtEOFErrortlen(tsocktcountR*R0tn((s-/usr/lib/python2.7/site-packages/dns/query.pyt	_net_read�s
	cCsMd}t|�}x4||krHt||�||j||�7}qWdS(s�Write the specified data to the socket.
    A Timeout exception will be raised if the operation is not completed
    by the expiration time.
    iN(R_R2tsend(R`tdataR*tcurrenttl((s-/usr/lib/python2.7/site-packages/dns/query.pyt
_net_writes

cCs�y|j|�Wnltjk
rtj�d \}}|dtjkr�|dtjkr�|dtjkr�|�q�nXdS(Nii(	tconnectRHRtsystexc_infoR'tEINPROGRESStEWOULDBLOCKtEALREADY(R0taddressttytv((s-/usr/lib/python2.7/site-packages/dns/query.pyt_connectscCs�|j�}t|||||�\}}	}tj|tjd�}
d}z�t|�}|
jd�tj�}|dk	r�|
j|�nt	|
|	�t
|�}
tjd|
�|}t
|
||�t|
d|�}tjd|�\}
t|
|
|�}Wd|dkr d}ntj�|}|
j�Xtjj|d|jd|jd|�}||_|j|�s�t�n|S(sReturn the response obtained after sending a query via TCP.

    @param q: the query
    @type q: dns.message.Message object
    @param where: where to send the message
    @type where: string containing an IPv4 or IPv6 address
    @param timeout: The number of seconds to wait before the query times out.
    If None, the default, wait forever.
    @type timeout: float
    @param port: The port to which to send the message.  The default is 53.
    @type port: int
    @param af: the address family to use.  The default is None, which
    causes the address family to use to be inferred from the form of of where.
    If the inference attempt fails, AF_INET is used.
    @type af: int
    @rtype: dns.message.Message object
    @param source: source address.  The default is the wildcard address.
    @type source: string
    @param source_port: The port from which to send the message.
    The default is 0.
    @type source_port: int
    @param one_rr_per_rrset: Put each RR into its own RRset
    @type one_rr_per_rrset: bool
    is!HiNRDRERF(RGRCRHtSOCK_STREAMRR	RJRRKRrR_tstructtpackRhRctunpackROR"RPRQRDRRRSR(RTR>RR?R5R@RARFRVRBR0RWR*RgttcpmsgtldataRYRZ((s-/usr/lib/python2.7/site-packages/dns/query.pyttcps8

	!			c&csZt|ttf�r*tjj|�}nt|ttf�rTtjj|�}ntjj|||�}|tjj	kr�tj
j|dddd|
�}|jj|�n|dk	r�|j||d|�n|j�}t|	||||�\}	}}|rG|tjj	kr,td��ntj|	tjd�}ntj|	tjd�}|jd�|dk	r�|j|�nt|
�}t||�t|�}|r�t||�|j|�n&tjd|�|}t|||�t}t }t}d}d}|r/|}tjj!}nd}|}d}t } x|sKt|�}!|!dkst|!|kr}|}!n|r�t"||�|j#d�\}}"n9t$|d	|!�}#tj%d|#�\}t$|||!�}tjj&|d
|j'd|j(dt d
|d|dt d| d|tjj	k�}$|$j)}t} d}%|dkr|$j*sv|$j*dj|kr�tj+j,d��n|$j*d}|j-tjj.kr�tj+j,d��nd}%|j/�}|tjj	kr|dj0|
krt }qt }qnx|$j*|%D]�}|r=tj+j,d��n|j-tjj.kr�|j|kr�|r�|dj0|
kr�tj+j,d��nt}n|tjj	kr�|}n||kr|tjj1ks�|tjj	kr|rt }qq|rtjj1}t}qqW|rC|j'rC|$j2rCtj+j,d��n|$VqJW|j3�dS(s�Return a generator for the responses to a zone transfer.

    @param where: where to send the message
    @type where: string containing an IPv4 or IPv6 address
    @param zone: The name of the zone to transfer
    @type zone: dns.name.Name object or string
    @param rdtype: The type of zone transfer.  The default is
    dns.rdatatype.AXFR.
    @type rdtype: int or string
    @param rdclass: The class of the zone transfer.  The default is
    dns.rdataclass.IN.
    @type rdclass: int or string
    @param timeout: The number of seconds to wait for each response message.
    If None, the default, wait forever.
    @type timeout: float
    @param port: The port to which to send the message.  The default is 53.
    @type port: int
    @param keyring: The TSIG keyring to use
    @type keyring: dict
    @param keyname: The name of the TSIG key to use
    @type keyname: dns.name.Name object or string
    @param relativize: If True, all names in the zone will be relativized to
    the zone origin.  It is essential that the relativize setting matches
    the one specified to dns.zone.from_xfr().
    @type relativize: bool
    @param af: the address family to use.  The default is None, which
    causes the address family to use to be inferred from the form of of where.
    If the inference attempt fails, AF_INET is used.
    @type af: int
    @param lifetime: The total number of seconds to spend doing the transfer.
    If None, the default, then there is no limit on the time the transfer may
    take.
    @type lifetime: float
    @rtype: generator of dns.message.Message objects.
    @param source: source address.  The default is the wildcard address.
    @type source: string
    @param source_port: The port from which to send the message.
    The default is 0.
    @type source_port: int
    @param serial: The SOA serial number to use as the base for an IXFR diff
    sequence (only meaningful if rdtype == dns.rdatatype.IXFR).
    @type serial: int
    @param use_udp: Use UDP (only meaningful for IXFR)
    @type use_udp: bool
    @param keyalgorithm: The TSIG algorithm to use; defaults to
    dns.tsig.default_algorithm
    @type keyalgorithm: string
    itINtSOAs. . %u 0 0 0 0t	algorithmscannot do a UDP AXFRs!Hi��iRDREtxfrtoriginttsig_ctxtmultitfirstRFs No answer or RRset not for qnamesfirst RRset is not an SOAisanswers after final SOAsIXFR base serial mismatchsmissing TSIGN(4t
isinstancetstrtunicodeR"tnamet	from_textt	rdatatypeRPt
make_querytIXFRtrrsett	authoritytappendRtuse_tsigRGRCt
ValueErrorRHRIRsRJRKR	RrR_R2RdRtRuRhR!R)temptyR1RMRcRvRQRDRRRtanswerR#t	FormErrortrdtypeR{tcopytserialtAXFRthad_tsigRO(&R>tzoneR�trdclassRR?RDtkeynamet
relativizeR5tlifetimeR@RAR�tuse_udptkeyalgorithmRTR�RVRBR0R*RgRwR+tdelete_modet
expecting_SOAt	soa_rrsett	soa_countR~tonameRR�tmexpirationRXRxRZtanswer_index((s-/usr/lib/python2.7/site-packages/dns/query.pyR}Ts�5



		
!	 
	$	

	(/Rt
__future__RR'R
RHRtRjRt
dns.exceptionR"tdns.inettdns.nametdns.messagetdns.rdataclasst
dns.rdatatypeR#tDNSExceptionRR�RR	RR R-R/thasattrR%R1R2R:RCRR!R[RcRhRrRyR�R�t
rdataclassRzR)ttsigtdefault_algorithmR}(((s-/usr/lib/python2.7/site-packages/dns/query.pyt<module>sL										B			
>

Spamworldpro Mini