-
Notifications
You must be signed in to change notification settings - Fork 0
/
resolv_dns.rb
37 lines (37 loc) · 974 Bytes
/
resolv_dns.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/ruby
=begin
DNS LOOKKUP LIB:
em-resolv-replace
eventmachine
-------------------------->
Resolv::DNS.new
--------------------------->
dnsobject.each_resource(domain,) do |var|
MX >> exchange
MS >> name
end
Resolv::DNS::Resource::IN::MX >> for mail server
Resolv::DNS::Resource::IN::A >> ip address
Resolv::DNS::Resource::IN::NS >> name server
------------------------------------------------------------------
Metasploit Rank >>>>>>
NormalRanking
GoodRanking
GreatRanking
EXcellentRanking
AverageRanking
LowRabking
ManualRanding
=end
require "em-resolv-replace"
$dns = Resolv::DNS.new
#$dns.each_address('yahoo.com'){|adress| puts adress}
$dns.each_resource("yahoo.com",Resolv::DNS::Resource::IN::MX) do |mail_servers|
puts mail_servers.exchange
end
$dns.each_resource("yahoo.com",Resolv::DNS::Resource::IN::A) do |mail_servers|
puts mail_servers
end
$dns.each_resource("yahoo.com",Resolv::DNS::Resource::IN::NS) do |mail_servers|
puts mail_servers.name
end