|
|
|
@ -37,9 +37,100 @@ function peerLookup(element) {
@@ -37,9 +37,100 @@ function peerLookup(element) {
|
|
|
|
|
|
|
|
|
|
function nsLookup(element) { |
|
|
|
|
|
|
|
|
|
var host = $(element).data('host'); |
|
|
|
|
|
|
|
|
|
// Try alternative DNS
|
|
|
|
|
var alfis = [ |
|
|
|
|
".ygg", |
|
|
|
|
".btn", |
|
|
|
|
".anon", |
|
|
|
|
".conf", |
|
|
|
|
".index", |
|
|
|
|
".index", |
|
|
|
|
".merch", |
|
|
|
|
".mirror", |
|
|
|
|
".mob", |
|
|
|
|
".screen", |
|
|
|
|
".srv" |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
$.each(alfis, function() { |
|
|
|
|
|
|
|
|
|
if (host.includes(this)) { |
|
|
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
|
type: 'GET', |
|
|
|
|
url: 'https://yggapi.duckdns.org/net/dig.php?records[]=A&records[]=AAAA&name=' + host, |
|
|
|
|
dataType: 'json', |
|
|
|
|
success: function (result) { |
|
|
|
|
if (result.success) { |
|
|
|
|
|
|
|
|
|
var total = 0; |
|
|
|
|
|
|
|
|
|
if (result.records.A.length) { |
|
|
|
|
|
|
|
|
|
$(result.records.A).each(function() { |
|
|
|
|
|
|
|
|
|
total++; |
|
|
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
|
type: 'GET', |
|
|
|
|
url: 'https://ipapi.co/' + this + '/json', |
|
|
|
|
dataType: 'json', |
|
|
|
|
success: function (result) { |
|
|
|
|
|
|
|
|
|
if (result.country_code && result.country_code != '' && result.country_code != 'undefined') { |
|
|
|
|
|
|
|
|
|
$(element).children('td:eq(3)').append(' ' + result.country_code + ' '); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (result.records.AAAA.length) { |
|
|
|
|
|
|
|
|
|
$(result.records.AAAA).each(function() { |
|
|
|
|
|
|
|
|
|
total++; |
|
|
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
|
type: 'GET', |
|
|
|
|
url: 'https://ipapi.co/' + this + '/json', |
|
|
|
|
dataType: 'json', |
|
|
|
|
success: function (result) { |
|
|
|
|
|
|
|
|
|
if (result.country_code && result.country_code != '' && result.country_code != 'undefined') { |
|
|
|
|
|
|
|
|
|
$(element).children('td:eq(3)').append(' ' + result.country_code + ' '); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (total == 1) { |
|
|
|
|
|
|
|
|
|
$(element).children('td:eq(0)').find('i').removeClass('c-5'); |
|
|
|
|
$(element).children('td:eq(0)').find('i').addClass('c-6'); |
|
|
|
|
|
|
|
|
|
} else if (total > 1) { |
|
|
|
|
|
|
|
|
|
$(element).children('td:eq(0)').find('i').removeClass('c-5'); |
|
|
|
|
$(element).children('td:eq(0)').find('i').addClass('c-7'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// Regular DNS
|
|
|
|
|
$.ajax({ |
|
|
|
|
type: 'GET', |
|
|
|
|
url: 'https://dns.google/resolve?name=' + $(element).data('host'), |
|
|
|
|
url: 'https://dns.google/resolve?name=' + host, |
|
|
|
|
dataType: 'json', |
|
|
|
|
success: function (result) { |
|
|
|
|
|
|
|
|
|