本文主要是介绍制作zmap的dns探针,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
- 进入cpan
perl -MCPAN -e shell - 安装相关包
install Net::DNS
(如果这种方式太慢,就到网站http://www.cpan.org/authors/01mailrc.txt.gz去下载,然后放到CPAN软件包下) - 然后将以下代码保存成 buildpacket.pl (名字自定义就好)
use Net::DNS;if ( $#ARGV != 0 ) {print "Usage: perl buildpacket.pl <domain>\n";print " Example: perl buildpacket.pl 1x1.cz\n";print " Coded by Vypor, https://github.com/Vypor\n";exit(1);}my $domain = $ARGV[0];my $dnspacket = new Net::DNS::Packet( $domain, 'IN', 'ANY' );$dnspacket->header->qr(0); #Query Responce Flag$dnspacket->header->aa(0); #Authoritative Flag$dnspacket->header->tc(0); #Truncated Flag$dnspacket->header->ra(0); #Recursion Desired$dnspacket->header->rd(1); #Recursion Available$udp_max = $dnspacket->header->size(65527);
这篇关于制作zmap的dns探针的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!