lf LddlZddlZddlZddlZddlmZmZmZmZddl m Z dZ dZ dZ dZejejejejejejejejejejejejd Zejejejejej d Z!Gd d Z"dS) N)AnyListOptionalSet)errorz3.0.0) DNSResolverr) AAAAAANYCAACNAMEMXNAPTRNSPTRSOASRVTXT)INCHAOSHSNONEr c eZdZ ddeeedeejdeddfdZ e de j fdZ e jdeeddfd Z ed ejd ed eddfd ZddedededejfdZdedejdejfdZdedejfdZd dZdedededdfdZdededdfdZd dZdS)!r N nameserversloopkwargsreturnc |ptj|_|jJ|ddt jdd|ji||_|r||_t|_ t|_ d|_ dS)N sock_state_cb) asyncioget_event_looprpoppycaresChannel_sock_state_cb_channelrset _read_fds _write_fds_timer)selfrrrs o/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/aiodns/__init__.py__init__zDNSResolver.__init__/s4G244 y$$$ ?D)))TTd6ITVTT  +*D %% c|jjSNr)serversr.s r/rzDNSResolver.nameservers<s }$$r1valuec||j_dSr3r4)r.r7s r/rzDNSResolver.nameservers@s % r1futresulterrornoc|rdS|G|tj|tj|dS||dSr3) cancelled set_exceptionrDNSErrorr&errnostrerror set_result)r9r:r;s r/ _callbackzDNSResolver._callbackDsk ==??  F     enWgm6L6LW6U6UVV W W W W W NN6 " " " " "r1hostqtypeqclassc t|}n0#t$r#td|wxYw|? t|}n0#t$r#td|wxYwt j|j}tj |j |}|j |||||S)Nzinvalid query type: {}zinvalid query class: {}r) query_class) query_type_mapKeyError ValueErrorformatquery_class_mapr#Futurer functoolspartialrCr)query)r.rDrErFr9cbs r/rRzDNSResolver.queryMs E"5)EE E E E5<familyctj|j}tj|j|}|j||||SNrH)r#rOrrPrQrCr) gethostbyname)r.rDrTr9rSs r/rWzDNSResolver.gethostbyname]sIn$),,,  t~s 3 3 ##D&"555 r1namectj|j}tj|j|}|j|||SrV)r#rOrrPrQrCr) gethostbyaddr)r.rXr9rSs r/rZzDNSResolver.gethostbyaddrcsGn$),,,  t~s 3 3 ##D"--- r1c8|jdSr3)r)cancelr6s r/r\zDNSResolver.cancelis r1fdreadablewritablec|s|r|rA|j||j|t|j||rA|j||j|t|j||j '|j d|j |_ dSdS||jvr4|j ||j |||jvr4|j ||j||js0|js+|j &|j d|_ dSdSdSdSNg?)r add_reader _handle_eventREADr+add add_writerWRITEr,r- call_later _timer_cbdiscard remove_reader remove_writerr\)r.r]r^r_s r/r(zDNSResolver._sock_state_cbls  #x # ' $$R);RFFF""2&&& ( $$R);RGGG##B'''{""i223GG #"T^##&&r*** ''+++T_$$''+++ ''+++> #$/ #dk>U ""$$$"  # # # #>U>Ur1eventctj}tj}|tkr|}n |tkr|}|j||dSr3)r&ARES_SOCKET_BADrdrgr) process_fd)r.r]rmread_fdwrite_fds r/rczDNSResolver._handle_eventsN)* D==GG e^^H   (33333r1c|js|jrV|jtjtj|jd|j|_ dSd|_ dSra) r+r,r)rpr&rorrhrir-r6s r/rizDNSResolver._timer_cbs] > T_  M $ $W%U V V V)..sDNCCDKKKDKKKr1)NNr3)rN)__name__ __module__ __qualname__rrstrr#AbstractEventLooprr0propertyr&r'rsetter staticmethodrOintrCrRsocket AddressFamilyrWrZr\boolr(rcrir"r1r/r r .s :>=A  HT#Y$7  9:  #'    %W_%%%X%&c&t&&&&#w~#s#S#T###\##c3 #v/C #'. ########044C4D4444r1r )#r#rPr&r}typingrrrrr __version____all__rdrg QUERY_TYPE_AQUERY_TYPE_AAAAQUERY_TYPE_ANYQUERY_TYPE_CAAQUERY_TYPE_CNAME QUERY_TYPE_MXQUERY_TYPE_NAPTR QUERY_TYPE_NSQUERY_TYPE_PTRQUERY_TYPE_SOAQUERY_TYPE_SRVQUERY_TYPE_TXTrJQUERY_CLASS_INQUERY_CLASS_CHAOSQUERY_CLASS_HSQUERY_CLASS_NONEQUERY_CLASS_ANYrNr r"r1r/rsP  "  #0#3#2#2#4#1#4#1#2#2#2#2   %3$6$3$5$4 ddddddddddr1