11// ==UserScript==
22// @name FOFA view
33// @namespace http://tampermonkey.net/
4- // @version 0.4.0
4+ // @version 0.4.1
55// @description Send the current website to FOFA
66// @author 0cat
77// @match http://*/*
@@ -48,6 +48,10 @@ div.innerHTML = `<div style="font-size:14px;color:rgba(0,0,0,0.65);box-shadow: 0
4848 <div style="margin-right: 6px;white-space: nowrap">运营商和org:</div>
4949 <div class="org_fofa" style="word-wrap:break-word;word-break:normal;overflow: hidden;">null</div>
5050 </div>
51+ <div style="margin-bottom: 4px;display: flex">
52+ <div style="margin-right: 6px;white-space: nowrap">ICP:</div>
53+ <div class="icp_fofa" style="word-wrap:break-word;word-break:normal;overflow: hidden;">null</div>
54+ </div>
5155 <div style="margin-bottom: 4px;display: flex">
5256 <div style="margin-right: 6px;white-space: nowrap">协议:</div>
5357 <div class="protocol_fofa" style="word-wrap:break-word;word-break:normal;overflow: hidden;">null</div>
@@ -98,7 +102,7 @@ body.appendChild(div)
98102 var FofaKey = GM_getValue ( "FofaKey" ) ;
99103 var url
100104 var search
101- var Fofa_url = "https://fofa.info/api/v1/search/all?email=" + username + "&key=" + FofaKey + "&fields=country,province,city,isp,as_organization,ip,title,protocol,port,host,server&qbase64="
105+ var Fofa_url = "https://fofa.info/api/v1/search/all?email=" + username + "&key=" + FofaKey + "&fields=country,province,city,isp,as_organization,ip,title,protocol,port,host,server,icp &qbase64="
102106 var target = window . location . hostname // 获取域名或者ip
103107 var isValidIP_reg = / ( \d { 1 , 3 } \. ) { 3 } \d { 1 , 3 } /
104108 var messaage = { }
@@ -129,6 +133,7 @@ body.appendChild(div)
129133
130134 const area = document . getElementsByClassName ( 'area_fofa' ) [ 0 ]
131135 const org = document . getElementsByClassName ( 'org_fofa' ) [ 0 ]
136+ const org = document . getElementsByClassName ( 'icp_fofa' ) [ 0 ]
132137 const protocol = document . getElementsByClassName ( 'protocol_fofa' ) [ 0 ]
133138 const port = document . getElementsByClassName ( 'port_fofa' ) [ 0 ]
134139
@@ -199,6 +204,8 @@ body.appendChild(div)
199204 area . textContent = [ target_location [ 0 ] || '' , target_location [ 1 ] || '' , target_location [ 2 ] || '' ] . filter ( item => item ) . join ( '-' ) || ''
200205
201206 org . textContent = [ target_location [ 3 ] || '' , target_location [ 4 ] || '' ] . filter ( item => item ) . join ( ',' ) || ''
207+
208+ icp . textContent = Array . from ( new Set ( target_data . filter ( item => item [ 11 ] ) . map ( item => item [ 11 ] ) ) ) . join ( ',' )
202209
203210 protocol . textContent = Array . from ( new Set ( target_data . filter ( item => item [ 7 ] ) . map ( item => item [ 7 ] ) ) ) . join ( ',' )
204211
@@ -224,6 +231,11 @@ body.appendChild(div)
224231 org . style . wordBreak = 'normal'
225232 org . style . overflow = 'hidden'
226233 org . style . width = '350px'
234+
235+ icp . style . wordWrap = 'break-word'
236+ icp . style . wordBreak = 'normal'
237+ icp . style . overflow = 'hidden'
238+ icp . style . width = '350px'
227239 }
228240 } ) ;
229241}
0 commit comments