1. Trang chủ
  2. » Giáo Dục - Đào Tạo

5 linux managing dns servers lpic 2 m5 slides kho tài liệu training

18 42 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 18
Dung lượng 602,84 KB

Nội dung

• • • • $ nslookup -querytype=mx pluralsight.com $ nslookup  server 127.0.0.1  set type=mx  pluralsight.com  ………  set debug  web.theurbanpenguin.com $ dig pluralsight.com -t mx $ dig pluralsight.com +short -t mx $ host www.pluralsight.com # Returns A Record $ host 8.8.8.8 # Returns PTR Record #!/usr/bin/perl use strict; use warnings; use Net::DNS::Resolver; my $hostname; print(“Enter a hostname: “); chomp($hostname = ); my $resolver = Net::DNS::Resolver->new( nameservers => [qw(8.8.8.8)], ); my $query = $resolver->search($hostname); if ($query) { foreach my $record ($query->answer) { next unless $record->type eq "A"; print(“Answer: " $record->address "\n"); } } $ sudo apt-get install -y python3-dnspython #!/usr/bin/python3 import dns.resolver resolver = dns.resolver.Resolver() answers = resolver.query("docker.theurbanpenguin.com","A") for answer in answers: print(answer) • • • • • • ... strict; use warnings; use Net: :DNS: :Resolver; my $hostname; print(“Enter a hostname: “); chomp($hostname = ); my $resolver = Net: :DNS: :Resolver->new( nameservers => [qw(8.8.8.8)], ); my... " $record->address " "); } } $ sudo apt-get install -y python3-dnspython #!/usr/bin/python3 import dns. resolver resolver = dns. resolver.Resolver() answers = resolver.query("docker.theurbanpenguin.com","A")...• • • • $ nslookup -querytype=mx pluralsight.com $ nslookup  server 127 .0.0.1  set type=mx  pluralsight.com  ………  set debug  web.theurbanpenguin.com $ dig pluralsight.com

Ngày đăng: 17/11/2019, 08:27