Skip to content

Commit

Permalink
add 添加对goby一键启动对支持,升级ant,axios版本
Browse files Browse the repository at this point in the history
  • Loading branch information
expzhizhuo committed Jan 11, 2024
1 parent ed4f2da commit 58dab2e
Show file tree
Hide file tree
Showing 8 changed files with 109 additions and 23 deletions.
69 changes: 57 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fofa-search",
"version": "1.1.2",
"version": "1.1.3",
"private": true,
"scripts": {
"serve": "vue-cli-service build --watch",
Expand All @@ -11,8 +11,8 @@
},
"dependencies": {
"@ant-design/icons-vue": "^6.1.0",
"ant-design-vue": "^3.3.0-beta.4",
"axios": "^1.2.2",
"ant-design-vue": "^4.1.0",
"axios": "1.6.0",
"cheerio": "^1.0.0-rc.12",
"core-js": "^3.8.3",
"js-cookie": "^3.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/options/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createApp } from 'vue'
import App from './components/App.vue'

import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';
import 'ant-design-vue/dist/reset.css';

const app = createApp(App)

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"message": "This is a chrome browser plug-in based on fofa to make it easy for users to quickly find information about the site."
},
"MainDesc": {
"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'}}"
"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'}}"
}
}
2 changes: 1 addition & 1 deletion src/plugins/_locales/zh/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"message": "这是一个基于fofa的chrome浏览器插件,方便用户快速查找网站信息。"
},
"MainDesc": {
"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'}}"
"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': '创建成功'}}"
}
}
2 changes: 1 addition & 1 deletion src/plugins/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"description": "__MSG_extDesc__",
"manifest_version": 3,
"name": "__MSG_extName__",
"version": "1.1.2",
"version": "1.1.3",
"default_locale": "en",
"action": {
"default_icon": {
Expand Down
47 changes: 44 additions & 3 deletions src/popup/components/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<div class="top">
<span>{{MainDesc.author}}:zhizhuo</span>
<span style="margin-left: 10px">{{MainDesc.team}}:WgpSec</span>
<a-button type="primary" shape="round" style="float: right;margin-right: 20px" @click="create_goby()">{{MainDesc.open_goby}}</a-button>
</div>
<div class="fofa-group">
<div>
Expand Down Expand Up @@ -146,24 +147,50 @@ import { CopyOutlined } from "@ant-design/icons-vue";
import { message } from "ant-design-vue";
import * as cheerio from "cheerio";
export default defineComponent({
components: {
CopyOutlined,
},
setup() {
const { proxy } = getCurrentInstance(); //来获取全局 globalProperties 中配置的信息
//定义变量
const urldata = ref(null);
const urldata = ref(null);//url地址
const domaindata = ref("");
const dataSource = ref([]);
const Ip = ref(null);
const Domain = ref(null);
const HostData = ref({});
const HostStatus = ref();
const tableLoading = ref();
const MainLoading = ref("");
const MainLoading = ref(false);
const PortList=ref([])
//国际化开发语言
const MainDesc = ref({});
const MainDesc = ref({
"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"
}
});
MainDesc.value = JSON.parse(
// eslint-disable-next-line no-undef
chrome.i18n.getMessage("MainDesc").replaceAll("'", '"')
Expand Down Expand Up @@ -243,6 +270,7 @@ export default defineComponent({
Domain.value = `domain="${domain}"`;
res.ports.forEach((item) => {
let resultdata = {};
PortList.value.push(item.port)
resultdata.port = item.port;
resultdata.base_protocol = item.base_protocol;
resultdata.protocol = item.protocol;
Expand Down Expand Up @@ -331,6 +359,18 @@ export default defineComponent({
message.success("Copy Success");
});
};
//创建goby扫描任务
const create_goby=()=>{
let ips=urldata.value
let ports=PortList.value
const goby_url = `goby://openScanDia?ips=${ips}&&ports=${ports.join(',')}`;
if(!ips || !ports){
message.error(MainDesc.value.MainError.create_error)
}else{
message.success(MainDesc.value.MainError.create_success)
window.open(goby_url)
}
}
//节点挂在执行的事件
onMounted(() => {
tableLoading.value = true;
Expand Down Expand Up @@ -383,6 +423,7 @@ export default defineComponent({
//自定义函数
copy,
create_goby,
};
},
});
Expand Down
2 changes: 1 addition & 1 deletion src/popup/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createApp } from 'vue'
import App from './components/App.vue'
//引入第三方组件
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';
import 'ant-design-vue/dist/reset.css';
//引入axios
import axios from '../plugins/axios'

Expand Down

0 comments on commit 58dab2e

Please sign in to comment.