PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  ꉃYc@s`dZddlZddlZddlZddlZyddlZWnek reddlZnXddl Z ddl Z ddl Z ddl Z ddlZ ddlZ ddlZ ddlZ ddlZ ddlZ ddlZ ejdkrddlZnde jjfdYZde jjfdYZe jjZde jjfd YZd e jjfd YZd e jjfd YZde jjfdYZde jjfdYZ de!fdYZ"de!fdYZ#de!fdYZ$de!fdYZ%de!fdYZ&e'a(dZ)e j*j+e j,j-e.e'e/ddZ0e j,j-e.e'dZ1iej2gej36ej4gej56Z6e'a7ej8Z9ej:Z;ej<Z=ej>Z?ej@ZAejBZCe'e'ejDdddd ZEdd!ZFe'd"ZGd#ZHd$ZId%ZJe'd&ZKd'ZLdS((s{DNS stub resolver. @var default_resolver: The default resolver object @type default_resolver: dns.resolver.Resolver objectiNtwin32tNXDOMAINcBs&eZdZedgZdZRS(s"The DNS query name does not exist.tqnamecCsd|jkr"tt|jS|jd}|jd }t|ttfrt|dkrd}tt t |}q|d}nd|t |fS(NRiisNone of DNS query names existis%s: %s( tkwargstsuperRt__str__t__doc__t isinstancetlisttsettlentmaptstr(tselfRtmsg((s0/usr/lib/python2.7/site-packages/dns/resolver.pyR2s   (t__name__t __module__RR t supp_kwargsR(((s0/usr/lib/python2.7/site-packages/dns/resolver.pyR.stYXDOMAINcBseZdZRS(s8The DNS query name is too long after DNAME substitution.(RRR(((s0/usr/lib/python2.7/site-packages/dns/resolver.pyR@stNoAnswercBs4eZdZded ZedgZdZRS(s<The DNS response does not contain an answer to the question.s %s: {query}itresponsecKs tt|jd|djS(NtqueryR(RRt _fmt_kwargstquestion(R R((s0/usr/lib/python2.7/site-packages/dns/resolver.pyROs(RRRtfmtR RR(((s0/usr/lib/python2.7/site-packages/dns/resolver.pyRJst NoNameserverscBs=eZdZdZded ZeddgZdZRS(sAll nameservers failed to answer the query. @param errors: list of servers and respective errors @type errors: [(server ip address, any object convertible to string)] Non-empty errors list will add explanatory message () s+All nameservers failed to answer the query.s%s {query}: {errors}itrequestterrorscKsg}xK|dD]?}|jd|d|dr7dnd|d|dfqWtt|jd |d jdd j|S( NRs Server %s %s port %s answered %siitTCPtUDPiiRRs; (tappendRRRRtjoin(R Rtsrv_msgsterr((s0/usr/lib/python2.7/site-packages/dns/resolver.pyR_s -(RRRRRR RR(((s0/usr/lib/python2.7/site-packages/dns/resolver.pyRSs t NotAbsolutecBseZdZRS(sEAn absolute domain name is required but a relative name was provided.(RRR(((s0/usr/lib/python2.7/site-packages/dns/resolver.pyR"hst NoRootSOAcBseZdZRS(sBThere is no SOA RR at the DNS root name. This should never happen!(RRR(((s0/usr/lib/python2.7/site-packages/dns/resolver.pyR#kst NoMetaqueriescBseZdZRS(s DNS metaqueries are not allowed.(RRR(((s0/usr/lib/python2.7/site-packages/dns/resolver.pyR$nstAnswercBsYeZdZedZdZdZdZdZdZ dZ dZ RS( s9DNS stub resolver answer Instances of this class bundle up the result of a successful DNS resolution. For convenience, the answer object implements much of the sequence protocol, forwarding to its rrset. E.g. "for a in answer" is equivalent to "for a in answer.rrset", "answer[i]" is equivalent to "answer.rrset[i]", and "answer[i:j]" is equivalent to "answer.rrset[i:j]". Note that CNAMEs or DNAMEs in the response may mean that answer node's name might not be the query name. @ivar qname: The query name @type qname: dns.name.Name object @ivar rdtype: The query type @type rdtype: int @ivar rdclass: The query class @type rdclass: int @ivar response: The response message @type response: dns.message.Message object @ivar rrset: The answer @type rrset: dns.rrset.RRset object @ivar expiration: The time when the answer expires @type expiration: float (seconds since the epoch) @ivar canonical_name: The canonical name of the query name @type canonical_name: dns.name.Name object c Csy||_||_||_||_d}d}x5tddD]$}yG|j|j|||}|dks|j|kr|j}nPWq@t k rc|t j j krHyj|j|j||t j j } |dks| j|kr| j}nx| D]} | j }PqWw@WqHt k rD|rEtd|qEqHXn|rdtd|qdq@Xq@W|dkr|rtd|n||_||_|dkrbxyp|j|j||t j j} |dks| j|kr| j}n| dj|kr| dj}nPWqt k r[y|j}Wq\t jjk rWPq\XqXqntj||_dS(NiiiR(RtrdtypetrdclassRtNonetxranget find_rrsettanswertttltKeyErrortdnst rdatatypetCNAMEttargetRtcanonical_nametrrsett authoritytSOAtminimumtparenttnametNoParentttimet expiration( R RR&R'Rtraise_on_no_answertmin_ttlR3tcounttcrrsettrdtsrrset((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt__init__sf                 cCs~|dkr|jjS|dkr,|jjS|dkrB|jjS|dkrX|jjS|dkrn|jjSt|dS(NR8R,tcoversR'R&(R3R8R,RCR'R&tAttributeError(R tattr((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt __getattr__s          cCs t|jS(N(R R3(R ((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt__len__scCs t|jS(N(titerR3(R ((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt__iter__scCs |j|S(N(R3(R ti((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt __getitem__scCs|j|=dS(N(R3(R RJ((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt __delitem__scCs|j||!S(N(R3(R RJtj((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt __getslice__scCs|j||5dS(N(R3(R RJRM((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt __delslice__s( RRRtTrueRBRFRGRIRKRLRNRO(((s0/usr/lib/python2.7/site-packages/dns/resolver.pyR%qs 7      tCachecBsAeZdZddZdZdZdZddZRS(sqSimple DNS answer cache. @ivar data: A dictionary of cached data @type data: dict @ivar cleaning_interval: The number of seconds between cleanings. The default is 300 (5 minutes). @type cleaning_interval: float @ivar next_cleaning: The time the cache should next be cleaned (in seconds since the epoch.) @type next_cleaning: float gr@cCs;i|_||_tj|j|_tj|_dS(sInitialize a DNS cache. @param cleaning_interval: the number of seconds between periodic cleanings. The default is 300.0 @type cleaning_interval: float. N(tdatatcleaning_intervalR:t next_cleaningt _threadingtLocktlock(R RS((s0/usr/lib/python2.7/site-packages/dns/resolver.pyRBs  cCstj}|j|krg}x<|jjD]+\}}|j|kr1|j|q1q1Wx|D]}|j|=qgWtj}||j|_ndS(s&Clean the cache if it's time to do so.N(R:RTRRt iteritemsR;RRS(R tnowtkeys_to_deletetktv((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt _maybe_cleans   cCskzV|jj|j|jj|}|dksM|jtjkrQdS|SWd|jjXdS(s)Get the answer associated with I{key}. Returns None if no answer is cached for the key. @param key: the key @type key: (dns.name.Name, int, int) tuple whose values are the query name, rdtype, and rdclass. @rtype: dns.resolver.Answer object or None N( RWtacquireR]RRtgetR(R;R:trelease(R tkeyR\((s0/usr/lib/python2.7/site-packages/dns/resolver.pyR_s   !cCs=z(|jj|j||j||jj|r]|j|=q]ni|_tj|j|_Wd|jjXdS(sFlush the cache. If I{key} is specified, only that item is flushed. Otherwise the entire cache is flushed. @param key: the key to flush @type key: (dns.name.Name, int, int) tuple or None N( RWR^R(RRthas_keyR:RSRTR`(R Ra((s0/usr/lib/python2.7/site-packages/dns/resolver.pytflush2s    N( RRRRBR]R_RcR(Re(((s0/usr/lib/python2.7/site-packages/dns/resolver.pyRQs     t LRUCacheNodecBs2eZdZdZdZdZdZRS(sLRUCache node. cCs(||_||_||_||_dS(N(RaRbtprevtnext(R RaRb((s0/usr/lib/python2.7/site-packages/dns/resolver.pyRBJs   cCs.|j|_||_||j_||_dS(N(RgRh(R tnode((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt link_beforePs   cCs.||_|j|_||j_||_dS(N(RgRh(R Ri((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt link_afterVs   cCs"|j|j_|j|j_dS(N(RgRh(R ((s0/usr/lib/python2.7/site-packages/dns/resolver.pytunlink\s(RRRRBRjRkRl(((s0/usr/lib/python2.7/site-packages/dns/resolver.pyRfGs    tLRUCachecBsAeZdZddZdZdZdZddZRS(sOBounded least-recently-used DNS answer cache. This cache is better than the simple cache (above) if you're running a web crawler or other process that does a lot of resolutions. The LRUCache has a maximum number of nodes, and when it is full, the least-recently used node is removed to make space for a new one. @ivar data: A dictionary of cached data @type data: dict @ivar sentinel: sentinel node for circular doubly linked list of nodes @type sentinel: LRUCacheNode object @ivar max_size: The maximum number of nodes @type max_size: int icCs;i|_|j|tdd|_tj|_dS(sInitialize a DNS cache. @param max_size: The maximum number of nodes to cache; the default is 100000. Must be > 1. @type max_size: int N(RRt set_max_sizeRfR(tsentinelRURVRW(R tmax_size((s0/usr/lib/python2.7/site-packages/dns/resolver.pyRBqs  cCs"|dkrd}n||_dS(Ni(Rp(R Rp((s0/usr/lib/python2.7/site-packages/dns/resolver.pyRn|s  cCsz}|jj|jj|}|dkr2dS|j|jjtjkre|j|j =dS|j |j |jSWd|jj XdS(s)Get the answer associated with I{key}. Returns None if no answer is cached for the key. @param key: the key @type key: (dns.name.Name, int, int) tuple whose values are the query name, rdtype, and rdclass. @rtype: dns.resolver.Answer object or None N( RWR^RRR_R(RlRbR;R:RaRkRoR`(R RaRi((s0/usr/lib/python2.7/site-packages/dns/resolver.pyR_s     cCsz|jj|jj|}|dk rH|j|j|j=nx?t|j|jkr|j j }|j|j|j=qKWt ||}|j |j ||j|@iN(R.R8tNamet from_texttsockett gethostnametdomainR troott nameserverstsearchtportttimeouttlifetimeR(tkeyringtkeynamettsigtdefault_algorithmt keyalgorithmtednst ednsflagstpayloadtcachetflagstFalsetretry_servfailtrotate(R ((s0/usr/lib/python2.7/site-packages/dns/resolver.pyRr s$+             cCst|tst|tr[yt|d}Wntk rQdg|_dSXt}nt}z7x0|D](}t|dksk|ddksk|ddkrqkn|j }t|dkrqkn|ddkr|jj |d qk|dd kr t j j |d |_qk|dd krdx`|d D]"}|jj t j j |q;Wqk|dd krkd |d krt|_qqkqkWWd|r|jnXt|jdkr|jj dndS(sProcess f as a file in the /etc/resolv.conf format. If f is a string, it is used as the name of the file to open; otherwise it is treated as the file itself.trs 127.0.0.1Nit#t;it nameserveriR}RtoptionsR(RR tunicodetopentIOErrorRRPRR tsplitRR.R8RzR}RRtclose(R tft want_closetlttokenstsuffix((s0/usr/lib/python2.7/site-packages/dns/resolver.pyRv s:    2 #cCsF|jddkrd}n$|jddkr<d}nd}|S(Nt it,(tfind(R tentryt split_char((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt_determine_split_charIs   cCsat|}|j|}|j|}x0|D](}||jkr1|jj|q1q1WdS(s&Configure a NameServer registry entry.N(R RRRR(R RRtns_listtns((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt_config_win32_nameserversXs   cCstjjt||_dS(s"Configure a Domain registry entry.N(R.R8RzR R}(R R}((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt_config_win32_domainbscCsmt|}|j|}|j|}x<|D]4}||jkr1|jjtjj|q1q1WdS(s"Configure a Search registry entry.N(R RRRRR.R8Rz(R RRt search_listts((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt_config_win32_searchgs   cCstytj|d\}}Wntk r5d}nX|r|j|y2tj|d\}}|rz|j|nWq$tk rq$Xnytj|d\}}Wntk rd}nX|r$|j|y2tj|d\}}|r |j|nWq$tk r q$Xnytj|d\}}Wntk rYd}nX|rp|j|ndS(s%Extract DNS info from a registry key.t NameServertDomaintDhcpNameServert DhcpDomaint SearchListN(t_winregt QueryValueExt WindowsErrorR(RRR(R RatserverstrtypetdomR((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt_config_win32_fromkeyqs<          cCsStjdtj}t}z&ytj|d}t}Wn#tk r_tj|d}nXz|j|Wd|j X|r@tj|d}zd}xtr-yltj ||}|d7}tj||}|j |||swnz|j|Wd|j XWqtk r)PqXqWWd|j XnWd|j XdS(s9Extract resolver configuration from the Windows registry.s2SYSTEM\CurrentControlSet\Services\Tcpip\Parameterss+SYSTEM\CurrentControlSet\Services\VxD\MSTCPNs=SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfacesii( RtConnectRegistryR(tHKEY_LOCAL_MACHINERtOpenKeyRPtEnvironmentErrorRtClosetEnumKeyt_win32_is_nic_enabled(R tlmt want_scant tcp_paramst interfacesRJtguidRa((s0/usr/lib/python2.7/site-packages/dns/resolver.pyRus@             c Csytj|d|}ztj|d\}}|tjkrLtntj|d|}z=tj|d\}}|tjkrtn|d@ SWd|jXWd|jXWnRttfk ry&tj|d\} }| dk SWqt k r t SXnXdS(Ns]SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\%s\Connectiont PnpInstanceIDs SYSTEM\CurrentControlSet\Enum\%st ConfigFlagsitNTEContextList( RRRtREG_SZt ValueErrort REG_DWORDRRR(RR( R RRt interface_keytconnection_keytpnp_idtttypet device_keyRtnte((s0/usr/lib/python2.7/site-packages/dns/resolver.pyRs6      cCstj}||}|dkrI|dkr@td|qI|}n||jkrjtd|nt|j||jS(NiiR(R:tTimeoutRtminR(R tstartRYtduration((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt_compute_timeouts     ic Csvt|ttfr-tjj|d }nt|ttfrWtjj|}ntjj|rrt nt|ttfrtj j|}ntj j |rt ng}|j r|j |nt|dkr |j |jtjjn|jr@xC|jD]} |j |j| qWn|j |j|jt} tj} x|D]}|jr|jj|||f} | d k r| jd kr|rtq| Sqntjj|||} |jd k r| j|j|jd|jn| j|j |j!|j"|j#d k rS|j#| _#nd }|j$}g}|j%rt&j'|nd}xf|d krt|dkrt(d| d|nx|D]}|j)| }y|}|rtj*j+| |||j,d|d|}ntj*j-| |||j,d|d|}|j#tj#j.@rt}|j)| }tj*j+| |||j,d|d|}nWnt/j0tj1j2fk r}|j |||j,||fd }qntj*j3k r&}|j |||j,||fd }qntj1j4k rs}|j5||j |||j,||fd }qnHt6k r}|j5||j |||j,||fd }qnX|j7}|tj7j8kr t8}|j |||j,||f|n|tj7j9ks.|tj7j:kr2Pn|tj7j;ksN|j< r^|j5|n|j |||j,tj7j=||fd }qW|d k rPnt|dkr|j)| }t>||}|d 9}tj?|qqW|j7tj7j:krqrnt@} PqrW| r2t:d |ntA|||||} |jrr|jjB|||f| n| S( sQuery nameservers to find the answer to the question. The I{qname}, I{rdtype}, and I{rdclass} parameters may be objects of the appropriate type, or strings that can be converted into objects of the appropriate type. E.g. For I{rdtype} the integer 2 and the the string 'NS' both mean to query for records with DNS rdata type NS. @param qname: the query name @type qname: dns.name.Name object or string @param rdtype: the query type @type rdtype: int or string @param rdclass: the query class @type rdclass: int or string @param tcp: use TCP to make the query (default is False). @type tcp: bool @param source: bind to this IP address (defaults to machine default IP). @type source: IP address in dotted quad notation @param raise_on_no_answer: raise NoAnswer if there's no answer (defaults is True). @type raise_on_no_answer: bool @param source_port: The port from which to send the message. The default is 0. @type source_port: int @rtype: dns.resolver.Answer instance @raises Timeout: no answers could be found in the specified lifetime @raises NXDOMAIN: the query name does not exist @raises YXDOMAIN: the query name is too long after DNAME substitution @raises NoAnswer: the response did not contain an answer and raise_on_no_answer is True. @raises NoNameservers: no non-broken nameservers are available to answer the question.it algorithmg?iRRtsourcet source_portiRN(CRR RR.R8RzR(R/t is_metatypeR$t rdataclasst is_metaclasst is_absoluteRR t concatenateR~RR}RPR:RR_R3Rtmessaget make_queryRtuse_tsigRRtuse_ednsRRRRRRtrandomtshuffleRRRttcpRtudptTCR{terrort exceptionRtUnexpectedSourcet FormErrortremovetEOFErrortrcodeRtNOERRORRtSERVFAILRtto_textRtsleepRR%Rc(R RR&R'RRR<Rt qnames_to_tryRt all_nxdomainRR+RRRRtbackoffRRt tcp_attempttexRt sleep_time((s0/usr/lib/python2.7/site-packages/dns/resolver.pyRs"                                 cCsD||_|dkr.|jjd|_n ||_||_dS(sAdd a TSIG signature to the query. @param keyring: The TSIG keyring to use; defaults to None. @type keyring: dict @param keyname: The name of the TSIG key to use; defaults to None. The key must be defined in the keyring. If a keyring is specified but a keyname is not, then the key used will be the first key in the keyring. Note that the order of keys in a dictionary is not defined, so applications should supply a keyname when a keyring is used, unless they know the keyring contains only one key. @param algorithm: The TSIG key algorithm to use. The default is dns.tsig.default_algorithm. @type algorithm: stringiN(RR(tkeysRR(R RRR((s0/usr/lib/python2.7/site-packages/dns/resolver.pyRs    cCs4|dkrd}n||_||_||_dS(sConfigure Edns. @param edns: The EDNS level to use. The default is -1, no Edns. @type edns: int @param ednsflags: The EDNS flags @type ednsflags: int @param payload: The EDNS payload size. The default is 0. @type payload: intiN(R(RRR(R RRR((s0/usr/lib/python2.7/site-packages/dns/resolver.pyRs    cCs ||_dS(sOverrides the default flags with your own @param flags: The flags to overwrite the default with @type flags: intN(R(R R((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt set_flagssN(RRRRPRBRrRvRRRRRRuRRR.R/tARtINRR(RRRRRR(((s0/usr/lib/python2.7/site-packages/dns/resolver.pyRqs$)  )   " - 7  cCstdkrtantS(s7Get the default resolver, initializing it if necessary.N(tdefault_resolverR(Rq(((s0/usr/lib/python2.7/site-packages/dns/resolver.pytget_default_resolvers  icCs"tj|||||||S(sQuery nameservers to find the answer to the question. This is a convenience function that uses the default resolver object to make the query. @see: L{dns.resolver.Resolver.query} for more information on the parameters.(RR(RR&R'RRR<R((s0/usr/lib/python2.7/site-packages/dns/resolver.pyRs cCst|ttfr3tjj|tjj}n|dkrKt}n|j sft |nxy8|j |tj j ||}|jj|kr|SWn#tjjtjjfk rnXy|j}Wqitjjk rtqiXqidS(sFind the name of the zone which contains the specified name. @param name: the query name @type name: absolute dns.name.Name object or string @param rdclass: The query class @type rdclass: int @param tcp: use TCP to make the query (default is False). @type tcp: bool @param resolver: the resolver to use @type resolver: dns.resolver.Resolver object or None @rtype: dns.name.NameN(RR RR.R8RzR~R(RRR"RR/R5R3tresolverRRR7R9R#(R8R'RRR+((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt zone_for_names"    cCs|tjtjB@dkr#tn|dkrP|dkrPtjtjng}g}d}y|dkrd}|tj@dkr|jd|jdq|jd|jdnY|j d} t | dkr| d} n|} t j j | } |j||}Wny)t jj |} |j||}Wq|tj@dkry*d} |tjks|tjkrtj|t jjd t} | j}| jjt}| jdk rx$| jD]}|j|jqWqn|tjks|tjkrtj|t jjd t}|j}|jjt}|jdk rx$|jD]}|j|jqoWqnWqt jj k rtjtjqtjtj!qXqqXnXd}y%|dkrd}n t"|}Wn:|tj#@dkrGytj$|}WqCqCXqGnX|dkrhtjtjng}|dkrtj%tj&g}n |g}|tj'@dkr|}nd }|tjks|tjkr=xb|D]W} xN|D]F}x=t(|D]1}|jtj|||| |ddffqWqWqWn|tjks[|tjkrx\|D]Q} xH|D]@}x7t(|D]+}|jtj|||| |ffqWqoWqbWnt |dkrtjtjn|S( Nit localhosts::s0.0.0.0s::1s 127.0.0.1t%iR<t()R{t AI_ADDRCONFIGt AI_V4MAPPEDtNotImplementedErrorR(tgaierrort EAI_NONAMEt AI_PASSIVERRR R.tipv6t inet_atontipv4tAI_NUMERICHOSTtAF_INET6t AF_UNSPECt _resolverRR/tAAAARRR2RRPR3taddresstAF_INETRRRt EAI_SYSTEMtinttAI_NUMERICSERVt getservbynamet SOCK_DGRAMt SOCK_STREAMt AI_CANONNAMEt_protocols_for_socktype(thosttservicetfamilytsocktypetprotoRtv6addrstv4addrsR2tpartstahosttaddrRtv6trdatatv4Rttuplest socktypestcname((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt _getaddrinfo:s             !         (  "c Cs|d}|d}t|dkr<|d}tj}nd}tj}t|||tjtjd}t|dkrtjdn|ddd}|tj @rd}nd}t j j |} |tj @dkry/tj| d} | jdjjt} Wqt jjt jjfk r|tj@rVtjtjn|} |dk r| d t|7} qqXn)|} |dk r| d t|7} n|tj@rt|} ntj||} | | fS( Niiiis'sockaddr resolved to multiple addressesRRtPTRR(R R{R R(RR+RtSOL_TCPRtNI_DGRAMR.t reversenamet from_addresstNI_NUMERICHOSTRRR3R1RRPRRRt NI_NAMEREQDRRR tNI_NUMERICSERVt getservbyport( tsockaddrRRRtscopeRR(R$tpnameRR+thostnameR((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt _getnameinfosB           cCs:|dkrtj}ntt|ddddS(NiPii(R(R{R|R9R+(R8((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt_getfqdns cCst|ddS(Nii(t_gethostbyname_ex(R8((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt_gethostbynamescCstg}g}t|dtjtjtjtj}|dd}x#|D]}|j|ddqHW|||fS(Niii(R+R{RRR-RR(R8taliasest addressesR(t canonicaltitem((s0/usr/lib/python2.7/site-packages/dns/resolver.pyR;s c Csy1tjj|}|dddf}tj}Wn|df}tj}nXt|tj\}}g}g}t|d|tj tj tj }|dd} x#|D]} |j | ddqW| ||fS(NiPiii( R.R R R{R RR9R2R+RR-RR( tipR$R5RR8RR=R>R(R?R@((s0/usr/lib/python2.7/site-packages/dns/resolver.pyt_gethostbyaddrs      cCsX|dkrt}n|att_tt_tt_ t t_ t t_ tt_dS(sOverride the system resolver routines in the socket module with versions which use dnspython's resolver. This can be useful in testing situations where you want to control the resolution behavior of python code without having to change the system's resolver settings (e.g. /etc/resolv.conf). The resolver to use may be specified; if it's not, the default resolver will be used. @param resolver: the resolver to use @type resolver: dns.resolver.Resolver object or None N(R(RRR+R{t getaddrinfoR9t getnameinfoR:tgetfqdnR<t gethostbynameR;tgethostbyname_exRBt gethostbyaddr(R((s0/usr/lib/python2.7/site-packages/dns/resolver.pytoverride_system_resolvers       cCs@datt_tt_tt_t t_ t t_ t t_dS(s4Undo the effects of override_system_resolver(). N(R(Rt_original_getaddrinfoR{RCt_original_getnameinfoRDt_original_getfqdnREt_original_gethostbynameRFt_original_gethostbyname_exRGt_original_gethostbyaddrRH(((s0/usr/lib/python2.7/site-packages/dns/resolver.pytrestore_system_resolvers     (MRR{RsR:Rt threadingRUt ImportErrortdummy_threadingt dns.exceptionR.t dns.flagstdns.ipv4tdns.ipv6t dns.messagetdns.namet dns.queryt dns.rcodetdns.rdataclasst dns.rdatatypetdns.reversenameRtRRt DNSExceptionRRRRRR"R#R$tobjectR%RQRfRmRqR(RRR/RRRRRPRRtSOL_UDPRR-RRRRCRJRDRKRERLRFRMRGRNRHRORR+R9R:R<R;RBRIRP(((s0/usr/lib/python2.7/site-packages/dns/resolver.pytsz                  v`l)   %      c '