Skip to content

Commit 58dab2e

Browse files
committed
add 添加对goby一键启动对支持,升级ant,axios版本
1 parent ed4f2da commit 58dab2e

8 files changed

Lines changed: 109 additions & 23 deletions

File tree

package-lock.json

Lines changed: 57 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fofa-search",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"private": true,
55
"scripts": {
66
"serve": "vue-cli-service build --watch",
@@ -11,8 +11,8 @@
1111
},
1212
"dependencies": {
1313
"@ant-design/icons-vue": "^6.1.0",
14-
"ant-design-vue": "^3.3.0-beta.4",
15-
"axios": "^1.2.2",
14+
"ant-design-vue": "^4.1.0",
15+
"axios": "1.6.0",
1616
"cheerio": "^1.0.0-rc.12",
1717
"core-js": "^3.8.3",
1818
"js-cookie": "^3.0.1",

src/options/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { createApp } from 'vue'
22
import App from './components/App.vue'
33

44
import Antd from 'ant-design-vue';
5-
import 'ant-design-vue/dist/antd.css';
5+
import 'ant-design-vue/dist/reset.css';
66

77
const app = createApp(App)
88

src/plugins/_locales/en/messages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"message": "This is a chrome browser plug-in based on fofa to make it easy for users to quickly find information about the site."
88
},
99
"MainDesc": {
10-
"message": "{'author': 'Author', 'team': 'Team', 'title': 'Basic information', 'description': {'country': 'Country/Region', 'city': 'City', 'organization': 'Org', 'lastime': 'Last update time'}, 'seotitle': 'SEO Information', 'portitle': 'Open Port', 'portdescription': {'recommendtitle': 'FOFA Query', 'prompt': 'Loading', 'prompterror': 'N/A'}, 'MainError': {'buttonerror': 'Do not click this plugin in the Plugin Center!', 'geturlerror': 'Failed to obtain url, please refresh Tab'}}"
10+
"message": "{'author': 'Author', 'team': 'Team', 'title': 'Basic information', 'open_goby': 'Create a goby scan', 'description': {'country': 'Country/Region', 'city': 'City', 'organization': 'Org', 'lastime': 'Last update time'}, 'seotitle': 'SEO Information', 'portitle': 'Open Port', 'portdescription': {'recommendtitle': 'FOFA Query', 'prompt': 'Loading', 'prompterror': 'N/A'}, 'MainError': {'buttonerror': 'Do not click this plugin in the Plugin Center!', 'geturlerror': 'Failed to obtain url, please refresh Tab', 'create_error': 'Creation failure', 'create_success': 'Created successfully'}}"
1111
}
1212
}

src/plugins/_locales/zh/messages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"message": "这是一个基于fofa的chrome浏览器插件,方便用户快速查找网站信息。"
88
},
99
"MainDesc": {
10-
"message": "{'author': '作者', 'team': '团队', 'title': '组件信息', 'description': {'country': '国家', 'city': '城市', 'organization': '组织', 'lastime': '最后更新时间'}, 'seotitle': '站点权重信息', 'seodescription': {'baidu': '百度', 'pc360': '360', 'sougou': '搜狗', 'shenma': '神马'}, 'portitle': '端口信息', 'portdescription': {'recommendtitle': 'FOFA推荐语句', 'prompt': '正在生成请稍等...', 'prompterror': '无法获取该站点信息'}, 'MainError': {'buttonerror': '请不要在插件中心点击此插件!', 'geturlerror': '获取url失败,请刷新Tab'}}"
10+
"message": "{'author': '作者', 'team': '团队', 'title': '组件信息', 'open_goby': '创建goby扫描', 'description': {'country': '国家', 'city': '城市', 'organization': '组织', 'lastime': '最后更新时间'}, 'seotitle': '站点权重信息', 'seodescription': {'baidu': '百度', 'pc360': '360', 'sougou': '搜狗', 'shenma': '神马'}, 'portitle': '端口信息', 'portdescription': {'recommendtitle': 'FOFA推荐语句', 'prompt': '正在生成请稍等...', 'prompterror': '无法获取该站点信息'}, 'MainError': {'buttonerror': '请不要在插件中心点击此插件!', 'geturlerror': '获取url失败,请刷新Tab', 'create_error': '创建失败', 'create_success': '创建成功'}}"
1111
}
1212
}

src/plugins/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"description": "__MSG_extDesc__",
33
"manifest_version": 3,
44
"name": "__MSG_extName__",
5-
"version": "1.1.2",
5+
"version": "1.1.3",
66
"default_locale": "en",
77
"action": {
88
"default_icon": {

src/popup/components/App.vue

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<div class="top">
66
<span>{{MainDesc.author}}:zhizhuo</span>
77
<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>
89
</div>
910
<div class="fofa-group">
1011
<div>
@@ -146,24 +147,50 @@ import { CopyOutlined } from "@ant-design/icons-vue";
146147
import { message } from "ant-design-vue";
147148
import * as cheerio from "cheerio";
148149
150+
149151
export default defineComponent({
150152
components: {
151153
CopyOutlined,
152154
},
153155
setup() {
154156
const { proxy } = getCurrentInstance(); //来获取全局 globalProperties 中配置的信息
155157
//定义变量
156-
const urldata = ref(null);
158+
const urldata = ref(null);//url地址
157159
const domaindata = ref("");
158160
const dataSource = ref([]);
159161
const Ip = ref(null);
160162
const Domain = ref(null);
161163
const HostData = ref({});
162164
const HostStatus = ref();
163165
const tableLoading = ref();
164-
const MainLoading = ref("");
166+
const MainLoading = ref(false);
167+
const PortList=ref([])
165168
//国际化开发语言
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+
});
167194
MainDesc.value = JSON.parse(
168195
// eslint-disable-next-line no-undef
169196
chrome.i18n.getMessage("MainDesc").replaceAll("'", '"')
@@ -243,6 +270,7 @@ export default defineComponent({
243270
Domain.value = `domain="${domain}"`;
244271
res.ports.forEach((item) => {
245272
let resultdata = {};
273+
PortList.value.push(item.port)
246274
resultdata.port = item.port;
247275
resultdata.base_protocol = item.base_protocol;
248276
resultdata.protocol = item.protocol;
@@ -331,6 +359,18 @@ export default defineComponent({
331359
message.success("Copy Success");
332360
});
333361
};
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+
}
334374
//节点挂在执行的事件
335375
onMounted(() => {
336376
tableLoading.value = true;
@@ -383,6 +423,7 @@ export default defineComponent({
383423
384424
//自定义函数
385425
copy,
426+
create_goby,
386427
};
387428
},
388429
});

src/popup/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { createApp } from 'vue'
33
import App from './components/App.vue'
44
//引入第三方组件
55
import Antd from 'ant-design-vue';
6-
import 'ant-design-vue/dist/antd.css';
6+
import 'ant-design-vue/dist/reset.css';
77
//引入axios
88
import axios from '../plugins/axios'
99

0 commit comments

Comments
 (0)