|
5 | 5 | <div class="top"> |
6 | 6 | <span>{{MainDesc.author}}:zhizhuo</span> |
7 | 7 | <span style="margin-left: 10px">{{MainDesc.team}}:WgpSec</span> |
| 8 | + <a-button type="primary" shape="round" style="float: right;margin-right: 20px" @click="create_goby()">{{MainDesc.open_goby}}</a-button> |
8 | 9 | </div> |
9 | 10 | <div class="fofa-group"> |
10 | 11 | <div> |
@@ -146,24 +147,50 @@ import { CopyOutlined } from "@ant-design/icons-vue"; |
146 | 147 | import { message } from "ant-design-vue"; |
147 | 148 | import * as cheerio from "cheerio"; |
148 | 149 |
|
| 150 | +
|
149 | 151 | export default defineComponent({ |
150 | 152 | components: { |
151 | 153 | CopyOutlined, |
152 | 154 | }, |
153 | 155 | setup() { |
154 | 156 | const { proxy } = getCurrentInstance(); //来获取全局 globalProperties 中配置的信息 |
155 | 157 | //定义变量 |
156 | | - const urldata = ref(null); |
| 158 | + const urldata = ref(null);//url地址 |
157 | 159 | const domaindata = ref(""); |
158 | 160 | const dataSource = ref([]); |
159 | 161 | const Ip = ref(null); |
160 | 162 | const Domain = ref(null); |
161 | 163 | const HostData = ref({}); |
162 | 164 | const HostStatus = ref(); |
163 | 165 | const tableLoading = ref(); |
164 | | - const MainLoading = ref(""); |
| 166 | + const MainLoading = ref(false); |
| 167 | + const PortList=ref([]) |
165 | 168 | //国际化开发语言 |
166 | | - const MainDesc = ref({}); |
| 169 | + const MainDesc = ref({ |
| 170 | + "author": "Author", |
| 171 | + "team": "Team", |
| 172 | + "title": "Basic information", |
| 173 | + "open_goby": "Create a goby scan", |
| 174 | + "description": { |
| 175 | + "country": "Country/Region", |
| 176 | + "city": "City", |
| 177 | + "organization": "Org", |
| 178 | + "lastime": "Last update time" |
| 179 | + }, |
| 180 | + "seotitle": "SEO Information", |
| 181 | + "portitle": "Open Port", |
| 182 | + "portdescription": { |
| 183 | + "recommendtitle": "FOFA Query", |
| 184 | + "prompt": "Loading", |
| 185 | + "prompterror": "N/A" |
| 186 | + }, |
| 187 | + "MainError": { |
| 188 | + "buttonerror": "Do not click this plugin in the Plugin Center!", |
| 189 | + "geturlerror": "Failed to obtain url, please refresh Tab", |
| 190 | + "create_error": "Creation failure", |
| 191 | + "create_success":"Created successfully" |
| 192 | + } |
| 193 | + }); |
167 | 194 | MainDesc.value = JSON.parse( |
168 | 195 | // eslint-disable-next-line no-undef |
169 | 196 | chrome.i18n.getMessage("MainDesc").replaceAll("'", '"') |
@@ -243,6 +270,7 @@ export default defineComponent({ |
243 | 270 | Domain.value = `domain="${domain}"`; |
244 | 271 | res.ports.forEach((item) => { |
245 | 272 | let resultdata = {}; |
| 273 | + PortList.value.push(item.port) |
246 | 274 | resultdata.port = item.port; |
247 | 275 | resultdata.base_protocol = item.base_protocol; |
248 | 276 | resultdata.protocol = item.protocol; |
@@ -331,6 +359,18 @@ export default defineComponent({ |
331 | 359 | message.success("Copy Success"); |
332 | 360 | }); |
333 | 361 | }; |
| 362 | + //创建goby扫描任务 |
| 363 | + const create_goby=()=>{ |
| 364 | + let ips=urldata.value |
| 365 | + let ports=PortList.value |
| 366 | + const goby_url = `goby://openScanDia?ips=${ips}&&ports=${ports.join(',')}`; |
| 367 | + if(!ips || !ports){ |
| 368 | + message.error(MainDesc.value.MainError.create_error) |
| 369 | + }else{ |
| 370 | + message.success(MainDesc.value.MainError.create_success) |
| 371 | + window.open(goby_url) |
| 372 | + } |
| 373 | + } |
334 | 374 | //节点挂在执行的事件 |
335 | 375 | onMounted(() => { |
336 | 376 | tableLoading.value = true; |
@@ -383,6 +423,7 @@ export default defineComponent({ |
383 | 423 |
|
384 | 424 | //自定义函数 |
385 | 425 | copy, |
| 426 | + create_goby, |
386 | 427 | }; |
387 | 428 | }, |
388 | 429 | }); |
|
0 commit comments