问题标签 [dnspython]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - 如何使用 dnspython 在区域文件中添加别名目标?
我正在使用 boto3 和 dnspython 库为 route-53 托管区域生成区域文件。我能够使用dnspython library(1.14.0)成功生成 A/CNAME/MX/TXT 记录集。但是,由于它没有任何 ALIAS TARGET (A Record) 的实现。我收到此错误:
这是因为 ALIAS 就像不支持 IPV4 的“alias.testdomain.com”。我可以通过编辑python库来生成它。还有其他方法吗?
提前致谢
python - 使用不同的名称服务器查询
我将更改域的默认名称服务器,然后获取其 A 记录!我尝试使用以下代码,但问题是当我使用 IP 地址作为名称服务器时,一切正常,但是当我使用名称服务器名称(例如“ns1.google.com”)时,我无法运行代码并出现异常。有什么想法吗?(我使用了这里的代码:Set specific DNS server using dns.resolver (pythondns))
我已经厌倦了以下内容:
这就是我得到的:
python - Do all DNS root servers and top-level-domain servers (TLD) support DNSSEC?
I know that DNSSEC has been widely implemented since 2010. For Authority name servers, it depends on the admin whether he wants to support DNSSEC or not. However, I would like to know whether or not all root name servers, and all TLD servers support DNSSEC?
How can I use tool like dnspython or dig to check DNSSEC support at root name servers, and TLD servers, or I do not need to check because all of them support DNSSEC already?
python - dnspython动态更新PeerBadKey
我正在使用 dnspython 尝试对 BIND9 服务器执行更新,但是我不断收到错误的密钥响应(“tsig verify failure (BADKEY)”)——当我使用 nsupdate 时,密钥工作得很好。有没有人成功实现了 dnspython 来针对 BIND DNS 执行动态更新?
这是一个包含所有代码和错误的 GIST: https ://gist.github.com/anonymous/0afc800ef0615aa7c1219ec25c032eef
python - DNS.RESOLVER.QUERY 在同一个 python 脚本的 exe 文件中给出了意外的输出
我在 Windows 10 上使用 python 2.7。这是我的代码片段:-
我正在查询 dns 服务器以获取 SRV 记录。我将 rdata 作为 RRset 值。我的目标是获取 hostName 并在我的代码中进一步使用它。当我在 IDE 上运行我的 python 程序时,我将 hostName 作为一个字符串,但特别是当我使用 py2exe 将相同的 python 文件转换为 exe 文件时,情况并非如此。我将 dns.resolver.query 的输出作为 HEX in exe文件。我的最终目标是让这个脚本作为 exe 文件运行。
python - Python:检查域列表的 MX 记录继续运行,然后停止,除非我按 Ctrl+C?
我有一个需要检查有效 MX 记录的域的 Excel 电子表格。它运行前 10 行,然后暂停,然后再次运行接下来的 10 行,然后暂停,然后运行接下来的 41 行,然后暂停,所以对我来说没有真正有意义的模式。
我是否需要告诉它“嘿,如果您在 x 秒内没有找到 mx 记录,请继续前进”,还是有更好的方法完全运行此代码?
python-2.7 - 使用 dnspython 添加 PTR 记录
我尝试使用以下代码将带有 dnspython 的 PTR 记录添加到 bind9:
通过时我能够成功添加记录:
但是当通过 nslookup 查询 dns 服务器时,我得到:
问题是“ZYXin-addr.arpa”。部分添加到查询中。在区域文件中,记录的语法正确
有没有更好的方法来使用 dnspython 添加 PTR 记录?
python - 为什么 dnspython 给我这个错误?
这是我的简单代码:
我正在host
退出一个文件。当我运行它时,我得到以下信息:
奇怪的是,当我在 python repl 中运行测试时,它似乎按预期工作:
此外,我的命令行中的 dns 解析工作得很好:
任何见解表示赞赏。
python-2.7 - Query an array of DNS records with dnspython, and proceed to the next element based on a custom timeout
I'm querying a bunch of DNS records with dnspython
, it seems to timeout when no reply is received (dns.exception.Timeout: The DNS operation timed out after 30.0006685256958 seconds
).
Here's the function:
whereas, if I query the DNS records that exist, an answer is received:
dnsAnswer = dnsResolver.query(domain, 'A')
I'm guessing this is because certain records (such as SRV
, AAAA
etc.) doesn't exist for github.com
. However, they do exist for other domains. Is there a way I can include a timeout (like say, 5 seconds) per query within the for
loop?
Something like -
if no response in 5 seconds, move to next element in the array
Or is there a better approach to exclude non-existent records?