Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- urlcrazy 2012-07-18 07:48:11.000000000 +0200
- +++ urlcrazydns6 2012-07-31 14:08:44.000000000 +0200
- @@ -73,15 +73,17 @@
- class Typo
- -attr_accessor :type, :name, :valid_name, :tld, :extension, :registered_name, :popularity, :resolved_a, :resolved_mx, :country_a
- +attr_accessor :type, :name, :valid_name, :tld, :extension, :registered_name, :popularity, :resolved_a, :resolved_aaaa, :resolved_mx, :country_a
- def get_resolved
- @resolved_a=""
- + @resolved_aaaa=""
- @resolved_mx=""
- return if !@valid_name
- begin
- @resolved_a=IPSocket.getaddress(@name)
- + @resolved_aaaa=dns.getresources(@name,Resolv::DNS::Resource::IN::AAAA).first.exchange.to_s
- if @resolved_a
- @country_a = Countrylookup.ip2cc(@resolved_a)
- end
- @@ -636,9 +638,9 @@
- widths=Array.new
- if output_type=="human"
- - headings=["Typo Type","Typo","Valid","Pop","DNS-A","CC-A","DNS-MX","Extn"]
- + headings=["Typo Type","Typo","Valid","Pop","DNS-A","DNS-AAAA","CC-A","DNS-MX","Extn"]
- else
- - headings=["Typo Type","Typo","Valid","Pop","DNS-A","CC-A","Country-A","DNS-MX","Extn"]
- + headings=["Typo Type","Typo","Valid","Pop","DNS-A","DNS-AAAA","CC-A","Country-A","DNS-MX","Extn"]
- end
- (0..headings.size-1).each {|c| columns[c]=Array.new }
- @@ -666,9 +668,10 @@
- columns[2] << typo.valid_name.to_s
- columns[3] << (check_popularity == true ? typo.popularity.to_s : "?")
- columns[4] << (resolve_domains == true ? typo.resolved_a.to_s : "?" )
- - columns[5] << (resolve_domains == true and typo.country_a ? typo.country_a.join(",") : "?" )
- - columns[6] << (resolve_domains == true ? typo.resolved_mx.to_s : "?" )
- - columns[7] << typo.extension.to_s
- + columns[5] << (resolve_domains == true ? typo.resolved_aaaa.to_s : "?" )
- + columns[6] << (resolve_domains == true and typo.country_a ? typo.country_a.join(",") : "?" )
- + columns[7] << (resolve_domains == true ? typo.resolved_mx.to_s : "?" )
- + columns[8] << typo.extension.to_s
- }
- # trim unneeded columns
- @@ -683,8 +686,10 @@
- unless resolve_domains
- headings -= ["DNS-A"]
- headings -= ["DNS-MX"]
- + headings -= ["DNS-AAAA"]
- columns[4] =nil
- columns[5] =nil
- + columns[6] =nil
- end
- headings.compact!
- columns.compact!
Advertisement
Add Comment
Please, Sign In to add comment