Skip to content

Commit

Permalink
update 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
qiwentaidi committed Jan 1, 2025
1 parent b796c7c commit 27c7a7f
Show file tree
Hide file tree
Showing 38 changed files with 263 additions and 236 deletions.
22 changes: 3 additions & 19 deletions core/isic/bing.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,20 @@ package isic

import (
"bytes"
"net/http"
"fmt"
"slack-wails/lib/clients"
"strings"

"github.com/PuerkitoBio/goquery"
)

// 根据网络环境,选择www.bing.com 还是cn.bing.com

func chooseBingEnvironment() (string, error) {
resp, _, err := clients.NewSimpleGetRequest("https://www.bing.com", clients.NotFollowClient())
if err != nil || resp == nil {
return "", err
}
if resp.StatusCode == http.StatusFound {
return "https://cn.bing.com", nil
}
return "https://www.bing.com", nil
}

func BingSearch(query string) (string, error) {
bingUrl, err := chooseBingEnvironment()
if err != nil {
return "", err
}
link := bingUrl + "/search?q=site%3a+" + strings.TrimSpace(query)
link := "https://www.bing.com/search?q=site%3a+" + strings.TrimSpace(query)
_, body, err := clients.NewSimpleGetRequest(link, clients.DefaultClient())
if err != nil {
return "请求失败", err
}
fmt.Printf("string(body): %v\n", string(body))
doc, err := goquery.NewDocumentFromReader(bytes.NewReader(body))
if err != nil {
return "解析网站失败", err
Expand Down
82 changes: 0 additions & 82 deletions core/portscan/socket.go

This file was deleted.

3 changes: 3 additions & 0 deletions core/webscan/infoscan.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ func (s *FingerScanner) NewActiveFingerScan(rootPath bool) {
Title: ti.Title,
Fingerprints: []string{fp.Fpe[0].ProductName},
Detect: "Active",
Port: ti.StatusCode,
Scheme: fp.URL.Scheme,
Host: fp.URL.Host,
}
}
})
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { onMounted, computed } from "vue";
import global from "./global";
import global from "./stores";
import Sidebar from "./components/Sidebar.vue";
import Titlebar from "./components/Titlebar.vue";
import { EventsOn } from "wailsjs/runtime/runtime";
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/components/About.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { BrowserOpenURL } from "wailsjs/runtime/runtime";
import global from "@/global"
import global from "@/stores"
const wikiAddress = "https://github.com/qiwentaidi/Slack/wiki/%E6%9B%B4%E6%96%B0%E6%97%A5%E5%BF%97"
const projectAddress = "https://github.com/qiwentaidi/Slack/"
const issueAddress = "https://github.com/qiwentaidi/Slack/issues/new"
Expand All @@ -24,6 +24,11 @@ const issueAddress = "https://github.com/qiwentaidi/Slack/issues/new"
$t('aside.update_log') }}</el-link>
</div>
<div></div>
<span>相关工具</span>
<el-descriptions direction="vertical" :column="1" border>
<el-descriptions-item label="Slack webscan cli">https://github.com/qiwentaidi/initial</el-descriptions-item>
<el-descriptions-item label="A chrome-extension for website fingerprint extraction">https://github.com/qiwentaidi/LuckyCat</el-descriptions-item>
</el-descriptions>
<div></div>
<span>联系我们</span>
<img src="@/assets/icon/wechat.png" style="height: 208px;">
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/Exp/Hikvision.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ import { Close, Picture, Upload } from '@element-plus/icons-vue';
import { HikvsionCamera } from 'wailsjs/go/services/App';
import { FormatWebURL, getProxy } from '@/util';
import { FileDialog, ReadFile } from 'wailsjs/go/services/File';
import { File } from '@/stores/interface';
import { ElMessage } from 'element-plus';
import async from 'async';
Expand Down Expand Up @@ -127,7 +126,7 @@ async function uploadFile() {
if (!path) {
return
}
let file: File = await ReadFile(path)
let file = await ReadFile(path)
if (file.Error) {
ElMessage.warning(file.Message)
return
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Sidebar.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { Refresh, Setting } from "@element-plus/icons-vue";
import updateUI from "./Update.vue";
import global from "@/global/index";
import global from "@/stores";
import menus from "@/router/menu";
import pocIcon from '@/assets/icon/pocmanagement.svg'
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Titlebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Close, Minus, Back, Right, RefreshRight } from '@element-plus/icons-vue';
import { Quit, WindowMinimise, WindowReload, WindowToggleMaximise } from "wailsjs/runtime/runtime";
import { IsMacOS } from "wailsjs/go/services/File";
import global from "@/global";
import global from "@/stores";
import { useRoute } from "vue-router";
import { ref, computed, onMounted } from "vue";
import updateUI from "./Update.vue";
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Update.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { Download } from "@element-plus/icons-vue";
import global from "@/global"
import global from "@/stores"
import { UpdatePocFile, DownloadLastestClient, Restart, IsMacOS } from "wailsjs/go/services/File";
import { ElMessageBox, ElNotification } from "element-plus";
import { onMounted, h } from "vue";
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { CheckFileStat, InitConfig, ReadFile, RemoveOldConfig, SaveDataToFile, ReadLocalStore } from 'wailsjs/go/services/File';
import { ElLoading, ElNotification } from 'element-plus';
import global from "./global";
import global from "./stores";
import { compareVersion, ReadLine, sleep } from './util';
import router from "./router";
import { File } from "./stores/interface";
import { CreateTable } from 'wailsjs/go/services/Database';
import { crackDict } from './stores/options';

Expand Down Expand Up @@ -33,7 +32,7 @@ export async function InitConfigFile(timeout: number) {
let result = await InitConfig();
catchError(result, loading)
} else {
let result: File = await ReadFile(global.PATH.homedir + global.PATH.LocalPocVersionFile)
let result = await ReadFile(global.PATH.homedir + global.PATH.LocalPocVersionFile)
global.UPDATE.LocalPocVersion = result.Content!
if (!global.UPDATE.LocalPocVersion || compareVersion(global.UPDATE.LocalPocVersion, "0.0.4") != 1) {
await RemoveOldConfig();
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/i18n/zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
'slogan': "安服集成化工具平台,希望能让你少开几个应用测试",
'home': '首页',
'penetration': '渗透测试',
'webscan': '网站扫描',
'webscan': '漏洞扫描',
'portscan': '端口扫描',
'dirscan': '目录扫描',
'pocdetail': '漏洞详情',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/linkage/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Callgologger, LoadDirsearchDict, DirScan, HunterSearch, Subdomain, FofaSearch } from 'wailsjs/go/services/App'
import global from '@/global'
import global from '@/stores'
import { ElMessage, ElNotification } from 'element-plus';
import { dirsearch, structs } from 'wailsjs/go/models';
import { getRootDomain } from '@/util';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import "element-plus/theme-chalk/el-message-box.css";
import "element-plus/theme-chalk/el-notification.css";
import 'element-plus/theme-chalk/el-loading.css'
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import global from "./global";
import global from "./stores";
import "./style/dark.css"
import "./style/light.css"
//引入依赖和语言
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const Logger = reactive({
length: 100, // 日志显示条数
})

const LOCAL_VERSION = "1.7.7"
const LOCAL_VERSION = "2.0.0"

const Language = ref("zh")
const Theme = ref(false)
Expand Down
12 changes: 0 additions & 12 deletions frontend/src/stores/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ export interface QuakeTableTabs {
message: string;
}

export interface PortScanData {
IP: string;
Port: number;
Server: string;
Link: string;
}

export interface Dir {
Status: number;
URL: string;
Expand Down Expand Up @@ -59,11 +52,6 @@ export interface Results {
ICP: string;
}

export interface File {
Error?: boolean;
Message?: string;
Content?: string;
}

export interface HunterEntryTips {
value: string;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/stores/style.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { computed } from 'vue'
import global from '@/global';
import global from '@/stores';

export const titlebarStyle = computed(() => {
return global.Theme.value ? {
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/style/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ html.dark {
color: #CF364C;
}

.el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
border-bottom-color: #1D1E1F;
}

.el-result:hover {
cursor: pointer;
background-color: #3c3c3c;
Expand Down
8 changes: 2 additions & 6 deletions frontend/src/util.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ElMessage, ElNotification } from "element-plus";
import global from "./global";
import global from "./stores";
import { Callgologger, CheckTarget, GoFetch, NetDial, Socks5Conn } from "wailsjs/go/services/App";
import { CheckFileStat, FileDialog, ReadFile, RemoveOldClient } from "wailsjs/go/services/File";
import Loading from "./components/Loading.vue";
Expand Down Expand Up @@ -56,11 +56,7 @@ function isEmpty(obj: string) {
return true;
}
return false;
}

export function CopyALL(filed: string[]) {
Copy(filed.join("\n"));
}
}

// Function to process the input target in the text area
// 处理文本域的目标输入
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/AppStarter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import itermIcon from '@/assets/icon/iterm.svg'
import chromeIcon from '@/assets/icon/chrome.svg'
import buttonIcon from '@/assets/icon/button.svg'
import gridIcon from '@/assets/icon/grid.svg'
import global from "@/global";
import global from "@/stores";
import { structs } from "wailsjs/go/models";
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/Asset/Company.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ExportAssetToXlsx } from '@/export'
import usePagination from "@/usePagination";
import { Copy, getRootDomain, transformArrayFields } from "@/util";
import exportIcon from '@/assets/icon/doucment-export.svg'
import global from "@/global";
import global from "@/stores";
import { LinkSubdomain } from "@/linkage";
import throttle from 'lodash/throttle';
import CustomTabs from "@/components/CustomTabs.vue";
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/Asset/ISICollection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
</template>

<script lang="ts" setup>
import global from '@/global';
import global from '@/stores';
import { ISICResult } from '@/stores/interface';
import usePagination from '@/usePagination';
import { sleep, ProcessTextAreaInput } from '@/util';
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/Asset/Subdomain.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import global from "@/global";
import global from "@/stores";
import { Copy, ReadLine, transformArrayFields } from '@/util'
import { ExportToXlsx } from '@/export'
import { reactive, ref, onMounted } from "vue";
Expand Down Expand Up @@ -340,7 +340,7 @@ const handleCheckAllChange = (val: boolean) => {
</el-form>
</el-drawer>
<el-dialog v-model="usefulDialog" title="使用须知">
<el-descriptions title="" direction="vertical" :column="4" border>
<el-descriptions direction="vertical" :column="4" border>
<template #title>
<span>下面为各API查询页码及积分获取情况,优先推荐配置Chaos,注册链接可在设置中查看</span>
<el-tag style="margin-block: 5px;">FOFA、Quake、Hunter默认不参与测绘,需要在设置中手动开启</el-tag>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/Permeation/Dirsearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ElMessage, ElNotification } from 'element-plus'
import { BrowserOpenURL, EventsOn, EventsOff } from 'wailsjs/runtime'
import { QuestionFilled, RefreshRight, Document, FolderOpened, DocumentCopy, ChromeFilled, Reading, Setting } from '@element-plus/icons-vue';
import { onMounted } from 'vue';
import global from '@/global';
import global from '@/stores';
import { CheckFileStat, FileDialog, List, OpenFolder } from 'wailsjs/go/services/File';
import { Dir } from '@/stores/interface';
import usePagination from '@/usePagination';
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/views/Permeation/Jsfinder.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script lang="ts" setup>
import { reactive, ref, h } from 'vue';
import { Copy, CopyALL, FormatWebURL } from '@/util';
import { Copy, FormatWebURL } from '@/util';
import { JSFind } from 'wailsjs/go/services/App';
import { QuestionFilled, Search, DocumentCopy, ChromeFilled } from '@element-plus/icons-vue';
import async from 'async';
import global from "@/global";
import global from "@/stores";
import { ElNotification, ElMessage } from 'element-plus';
import { BrowserOpenURL } from 'wailsjs/runtime/runtime';
import ContextMenu from '@imengyu/vue3-context-menu'
Expand Down Expand Up @@ -234,7 +234,7 @@ function onContextMenu(e: MouseEvent, data: any) {
<span style="font-weight: bold; margin-right: 5px;">{{ item.title }}: {{ getLength(item.data.value)
}}</span>
</div>
<el-button round type="primary" size="small" @click="CopyALL(item.data.value.map(item => item.Filed))">Copy
<el-button round type="primary" size="small" @click="Copy((item.data.value.map(item => item.Filed).join('\n')))">Copy
ALL</el-button>
</div>
<!-- CONTENT -->
Expand Down
Loading

0 comments on commit 27c7a7f

Please sign in to comment.