var add_dns_result = function(obj) { if(obj) { var title = obj.title; var logo = '/img/fai/'+obj.logo; var html = '
'; html+= '

'+title+' '+logo+'

'; if(!obj.servers.length) { html+= '
Echec
'; } else { html+= ''; $(obj.servers).each(function(i, v) { html+= ''; html+= ''; if(!v.datas) { html+= ''; } else { if(v.datas.indexOf('REFUSED') != -1) { v.datas = ' '+v.datas; } html+= ''; } html+= ''; }); } html+= ''; html+= ''; $('#results').append(html); } } var add_whois_result = function(obj) { if(obj) { var title = obj.title; var logo = '/img/fai/'+obj.logo; var html = '
'; html+= '

'+title+'

'; if(!obj.datas) { html+= '
Echec
'; } else { html+= '
'+v.dns+' Aucun réponse'+v.datas+'
'; html+= ''; html+= ''; html+= ''; } html+= ''; html+= ''; $('#results').append(html); } } var init = function(loading2) { if(!loading2) { $('#results').html(''); $('#loading .bar').css('width', 0); $('#loading').fadeIn(); } else { $('#results').html(''); $('#loading2 .bar').css('width', 0); $('#loading2').fadeIn(); } } var dns_done = 0; var results = null; var end = function(loading2) { if(!loading2) { $('#loading').fadeOut(); } else { $('#loading2').fadeOut(); } } var update = function() { dns_done++; $('#loading .bar').css('width', (100*dns_done/dns_length)+'%'); if(dns_done == dns_length) { window.setTimeout(function() { end(); }, 1000); } } var analyse = function() { var type = $('#type').val(); var ipv = $('#type').val() == 1 ? '4' : '6'; var domain = $('#domain').val().replace(/\s*/, ''); if(!domain) { $('#domain').addClass('input_error'); return false; } dns_done = 0; init(); $('#domain').removeClass('input_error'); for(var u=0; u
'+obj.datas+'