{"id":19720,"date":"2021-01-28T10:19:58","date_gmt":"2021-01-28T07:19:58","guid":{"rendered":"https:\/\/web-dev.iptp.com\/?page_id=19720"},"modified":"2021-01-29T11:54:41","modified_gmt":"2021-01-29T08:54:41","slug":"asn-info","status":"publish","type":"page","link":"https:\/\/www.iptp.us\/ja\/iptp-tools\/asn-info\/","title":{"rendered":"ASN Info"},"content":{"rendered":"<div class=\"asn-info\">\r\n\t\t\t\t\t\t<h2 class=\"heading__second text-uppercase\">Lookup an ASN or IP address<\/h2>\r\n\t\t\t\t\t\t<div class=\"asn-info__wrap\">\r\n\t\t\t\t\t\t\t<form class=\"js_form_asn_info\">\r\n\t\t\t\t\t\t\t\t<div class=\"asn-info__search\">\r\n\t\t\t\t\t\t\t\t\t<!-- <input type=\"text\" class=\"asn-info__input\" name=\"asn-info\" id=\"\" placeholder=\"Enter ASN or IP address to search\" required=\"\"> -->\r\n\r\n\t\t\t\t\t\t\t\t\t<div class=\"input-group\">\r\n\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" name=\"asn-info\" id=\"asn-info\" placeholder=\"Enter ASN or IP address to search\" required style=\"height: 38px;\">\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t      <button type=\"submit\" class=\"btn btn-primary\" style=\"background:white;height:38px;overflow: hidden;border: none !important;outline: none !important;\">\r\n\t\t\t\t\t\t\t\t      \t\t<img src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/ywAAAAAAQABAAACAUwAOw==\" alt=\"ASN Info\" style=\"width:20px;height:20px;\" data-src=\"https:\/\/www.iptp.us\/wp-content\/themes\/iptp-theme\/images\/search-primary.svg\" class=\"lazy\">\r\n\t\t\t\t\t\t\t\t      <\/button>\r\n\t\t\t\t\t\t\t\t    <\/div>\r\n\r\n\r\n\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t\t<\/form>\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t<p class=\"asn-info__note\" style=\"margin-top:5px;\">Enter an ASN (Autonomous System Number) or IP address, and we&rsquo;ll display the ASN information for it.<\/p>\r\n\r\n\r\n\t\t\t\t\t\t\t<div class=\"text-center loading-chat-js\" style=\"display:none;\">\r\n\t\t\t\t\t            <div class=\"lds-roller\"><div><\/div><div><\/div><div><\/div><div><\/div><div><\/div><div><\/div><div><\/div><div><\/div><\/div>\r\n\t\t\t\t\t        <\/div>\r\n\r\n\r\n\t\t\t\t\t\t\t<div class=\"asn-info__mess asn-info__note\">\r\n\r\n\t\t\t\t\t\t\t<\/div>\r\n\r\n\t\t\t\t\t\t\t<!-- <div class=\"asn-info__item_wrap\"><\/div> -->\r\n\r\n\r\n\r\n  \t\t\t\t\t\t\t<div class=\"table-responsive\">\r\n\t\t\t\t\t\t\t <table class=\"asn-info__item_wrap_table table table-striped\" style=\"display: none; border-radius:8px !important;\">\r\n\t\t\t\t\t\t\t    <thead>\r\n\t\t\t\t\t\t\t      <tr>\r\n\t\t\t\t\t\t\t        <th>ASN<\/th>\r\n\t\t\t\t\t\t\t        <th>Name<\/th>\r\n\t\t\t\t\t\t\t        <th>Description<\/th>\r\n\t\t\t\t\t\t\t      <\/tr>\r\n\t\t\t\t\t\t\t    <\/thead>\r\n\t\t\t\t\t\t\t    <tbody class=\"asn-info__item_wrap\">\r\n\r\n\t\t\t\t\t\t\t   \r\n\t\t\t\t\t\t\t     \r\n\t\t\t\t\t\t\t    <\/tbody>\r\n\t\t\t\t\t\t\t  <\/table>\r\n\t\t\t\t\t\t\t<\/div>\r\n\r\n\r\n\t\t\t\t\t\t\t<!-- <div class=\"asn-info__item\" style=\"display:none\">\r\n\t\t\t\t\t\t\t\t<div class=\"--column\">\r\n\t\t\t\t\t\t\t\t\t<span class=\"--title\">ASN<\/span>\r\n\t\t\t\t\t\t\t\t\t<span class=\"--s1\">AS666<\/span>\r\n\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t\t\t<div class=\"--column\">\r\n\t\t\t\t\t\t\t\t\t<span class=\"--title\">Name<\/span>\r\n\t\t\t\t\t\t\t\t\t<span class=\"--s2\">Headquarters, USAISC<\/span>\r\n\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t\t\t<div class=\"--column\" style=\"\">\r\n\t\t\t\t\t\t\t\t\t<span class=\"--title\">Description<\/span>\r\n\t\t\t\t\t\t\t\t\t<span class=\"--s3\">inactive<\/span>\r\n\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t\t<\/div> -->\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div><script type=\"text\/javascript\">\r\n\t\t\t\t\t\tjQuery(function($) {\r\n\r\n\t\t\t\t\t\t\tvar first_focus = false;\r\n\r\n\t\t\t\t\t\t\t$(document).on('focus', '[name=\"asn-info\"]', function(e) {\r\n\t\t\t\t\t\t\t\tif (first_focus == true) return;\r\n\t\t\t\t\t\t\t\t$(this).val(\"AS\");\r\n\r\n\t\t\t\t\t\t\t\tfirst_focus = true;\r\n\t\t\t\t\t\t\t});\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t$(document).on('submit', '.js_form_asn_info', function(e) {\r\n\t\t\t\t\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\t\t\t\t\tvar $this = $(this);\r\n\r\n\t\t\t\t\t\t\t\tvar v = $this.find('[name=\"asn-info\"]').val();\r\n\r\n\t\t\t\t\t\t\t\t\/\/ if ( !v  ) return;\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\t$.ajax({\r\n\t\t\t\t\t\t\t\t\ttype: \"post\",\r\n\t\t\t\t\t\t\t\t\tdataType: \"json\",\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t url: benevolent_data.admin_ajax,\r\n\t\t\t\t\t\t\t\t\tdata: {\r\n\r\n\t\t\t\t\t\t\t\t\t\taction: \"search_ip_asn\",\r\n               \t\t\t\t\t\t\tip:v,\r\n\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\tcontext: this,\r\n\t\t\t\t\t\t\t\t\tbeforeSend: function() {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\/\/   $('.btn__jumboix').attr('disabled', true);\r\n\t\t\t\t\t\t\t\t\t\t$('.asn-info__item').hide();\r\n\t\t\t\t\t\t\t\t\t\t$('.asn-info__mess').html('');\r\n\r\n\t\t\t\t\t\t\t\t\t\t$('.asn-info__item').find('.--s1').html('');\r\n\t\t\t\t\t\t\t\t\t\t$('.asn-info__item').find('.--s2').html('');\r\n\t\t\t\t\t\t\t\t\t\t$('.asn-info__item').find('.--s3').html('');\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t$('.asn-info__item_wrap_table').hide();\r\n\r\n\t\t\t\t\t\t\t\t\t\t$('.loading-chat-js').show();\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\tsuccess: function(response) {\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\/\/ console.log( response );\r\n\r\n\t\t\t\t\t\t\t\t\t\t$('.loading-chat-js').hide();\r\n\r\n\t\t\t\t\t\t\t\t\t\tif ( response && response.length > 0 ){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t$('.asn-info__item_wrap').html('');\r\n\r\n\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tvar response2 = response.filter(\r\n\t\t\t\t\t\t\t\t\t\t\t  (item, index, self) =>\r\n\t\t\t\t\t\t\t\t\t\t\t    index === self.findIndex(r => r.as_number === item.as_number)\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tfor( var i in response2  ) {\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t$('.asn-info__item_wrap').append(`\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t   <tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t        <td class=\"asn-info__item_wrap_td\">`+( response2[i].as_number )+`\r\n\t\t\t\t\t\t\t\t\t\t\t\t        <td class=\"asn-info__item_wrap_td\">`+response2[i].as_name+`\r\n\t\t\t\t\t\t\t\t\t\t\t\t        <td class=\"asn-info__item_wrap_td\">`+response2[i].as_description+`\r\n\t\t\t\t\t\t\t\t\t\t\t\t      \r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t`\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t $('.asn-info__item_wrap_table').show();\r\n\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t$('.asn-info__mess').html('Not found ! Please try again !');\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\/\/ if (response.status != 404) {\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\/\/ \tif (response.asn.asn != undefined) {\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\/\/ \t\t$('.asn-info__item').find('.--s1').html( response.asn.startsWith(\"AS\") ? response.asn.slice(2) : response.asn  );\r\n\t\t\t\t\t\t\t\t\t\t\/\/ \t\t$('.asn-info__item').find('.--s2').html(response.as_name);\r\n\t\t\t\t\t\t\t\t\t\t\/\/ \t\t$('.asn-info__item').find('.--s3').html(response.asn.country);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\/\/ \t\/\/\tconsole.log(response.asn_name);\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\/\/ \t\/\/\tconsole.log('th1');\r\n\r\n\t\t\t\t\t\t\t\t\t\t\/\/ \t} else {\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\/\/ \t\t$('.asn-info__item').find('.--s1').html( response.asn.startsWith(\"AS\") ? response.asn.slice(2) : response.asn );\r\n\t\t\t\t\t\t\t\t\t\t\/\/ \t\t$('.asn-info__item').find('.--s2').html(response.as_name);\r\n\t\t\t\t\t\t\t\t\t\t\/\/ \t\t$('.asn-info__item').find('.--s3').html(response.country_code);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\/\/ \t\/\/\tconsole.log(response.asn_name);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\/\/ \t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\/\/ \t$('.asn-info__item').show();\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\/\/ } else {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\/\/ \t$('.asn-info__mess').html('Not found !');\r\n\r\n\t\t\t\t\t\t\t\t\t\t\/\/ }\r\n\r\n\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\terror: function(jqXHR, textStatus, errorThrown) {\r\n\t\t\t\t\t\t\t\t\t\t\/\/ location.href = location.href;\r\n\r\n\t\t\t\t\t\t\t\t\t\t$('.asn-info__mess').html('Not found !');\r\n\r\n\t\t\t\t\t\t\t\t\t},\r\n\r\n\t\t\t\t\t\t\t\t\tstatusCode: {\r\n\t\t\t\t\t\t\t\t\t\t404: function() {\r\n\t\t\t\t\t\t\t\t\t\t\t$('.asn-info__mess').html('Not found !');\r\n\t\t\t\t\t\t\t\t\t\t},\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t});\r\n\r\n\r\n\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t<\/script>\n","protected":false},"excerpt":{"rendered":"<p>&#8230;<\/p>\n","protected":false},"author":14,"featured_media":0,"parent":276,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.iptp.us\/ja\/wp-json\/wp\/v2\/pages\/19720"}],"collection":[{"href":"https:\/\/www.iptp.us\/ja\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.iptp.us\/ja\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.iptp.us\/ja\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iptp.us\/ja\/wp-json\/wp\/v2\/comments?post=19720"}],"version-history":[{"count":3,"href":"https:\/\/www.iptp.us\/ja\/wp-json\/wp\/v2\/pages\/19720\/revisions"}],"predecessor-version":[{"id":19756,"href":"https:\/\/www.iptp.us\/ja\/wp-json\/wp\/v2\/pages\/19720\/revisions\/19756"}],"up":[{"embeddable":true,"href":"https:\/\/www.iptp.us\/ja\/wp-json\/wp\/v2\/pages\/276"}],"wp:attachment":[{"href":"https:\/\/www.iptp.us\/ja\/wp-json\/wp\/v2\/media?parent=19720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}