import dayjs from 'dayjs'; export const useHashDetail = () => { const intelligenceLabels = ref([]) as any const topDetailList = ref([]) as any const riskLevel = ref(2) const confidenceLevel = ref(2) const detailTitle = ref('xydxz@webmine.cz') const tabs = ref([ { title: '基本信息' }, { title: '行为分析', disabled: true }, { title: '网络分析' }, { title: '情报聚合' }, { title: 'Graph', disabled: true }, ]) const basicInfoLeft = ref([ {name: 'MD5', content: '5377e8f2ebdb280216c37a6195da9d6c'}, {name: 'SHA1', content: 'b54c705193b7963a0d40699a91cdb34fedecbe88'}, {name: 'SHA256', content: 'b54c705193b7963a0d40699a91cdb34fedecbe88'}, {name: '恶意类型', content: '木马'}, {name: '家族/团伙', content: 'Berbew'}, ]) const basicInfoRight = ref([ {name: '文件名称', content: '- -'}, {name: '文件大小', content: '85232字节'}, {name: '文件类型', content: 'elf'}, {name: '发现时间', content: '2022-07-30 03:46:52'}, {name: '流行度', content: '', rank: '1'}, ]) const currentName = ref('基本信息') // 情报聚合 const openSourceTableData = ref([]) as any const openSourceTableColumn = reactive([ { prop: "name", label: "情报源", minWidth: '150px', }, { prop: "tags", label: "情报标签", minWidth: '500px', slotName: 'tags' }, { prop: "time", label: "时间", }, ]) // 相关样本 const relatedSampleTableData = ref([]) as any const relatedSampleTableColumn = reactive([ { prop: "name", label: "情报源", minWidth: '300px', }, { prop: "maliciousTypes", label: "恶意类型", minWidth: '150px', }, { prop: "home", label: "家族/团伙", minWidth: '300px', }, { prop: "tags", label: "情报标签", width: '400px', slotName: 'tags' }, { prop: "time", label: "发现", minWidth: '180px' }, ]) // 相关事件 const relatedEventsTableData = ref([]) as any const relatedEventsTableColumn = reactive([ { prop: "name", label: "情报源", minWidth: '150px', }, { prop: "tags", label: "情报标签", minWidth: '500px', slotName: 'tags' }, { prop: "author", label: "发布者", minWidth: '150px', }, { prop: "time", label: "时间", }, ]) function init() { getPageData() } async function getPageData() { openSourceTableData.value = [ { name: '开源情报', tags: [{ name: 'automatic-collection', type: 'default' }], time: dayjs().format('YYYY-MM-DD') }, ] intelligenceLabels.value = [ { name: '其他远控', type: 'error' }, { name: 'sinkhole', type: 'error' }, { name: 'GDoor', type: 'error' }, { name: 'Zegost', type: 'waring' }, { name: 'Agentb', type: 'waring' }, { name: '动态域名', type: 'default' }, ] topDetailList.value = [ { icon: 'icon-wenjiandaxiao', title: '文件大小', desc: '85232字节' }, { icon: 'icon-wenjianleixing', title: '文件类型', desc: 'elf' }, { icon: 'icon-eyileixing', title: '恶意类型', desc: '木马' }, { icon: 'icon-jiazutuanhuo', title: '家族/团伙', desc: "Berbew" }, { icon: 'icon-faxianshijian', title: '发现时间', desc: '2022-07-30 03:46:52' }, { icon: 'icon-liuhangdu', rank: '1', title: '流行度', desc: '' }, ] relatedEventsTableData.value = [ { name: 'https://t.co/eczu2eh', tags: [{ name: '可疑', type: 'waring' }], author: '微步在线', time: dayjs().format('YYYY-MM-DD') }, { name: 'https://t.co/eczu2eh', tags: [{ name: 'xred', type: 'default' }], author: 'Hacknews', time: dayjs().format('YYYY-MM-DD') }, { name: 'https://t.co/eczu2eh', tags: [{ name: '可疑', type: 'waring' }], author: '腾讯安全', time: dayjs().format('YYYY-MM-DD') }, ] relatedSampleTableData.value = [ { name: 'f01ed0c8080a7acf32e5aeaf8ae3ff65', maliciousTypes: 'HackTool,木马', home: 'Win64/HackTool.CobaltStr', tags: [{ name: 'HackTool', type: 'error' }, { name: '木马', type: 'error' }], time: dayjs().format('YYYY-MM-DD') }, { name: 'f01ed0c8080a7acf32e5aeaf8ae3ff65', maliciousTypes: '后门木马,Backdoor', home: 'DarkKomet,Win32/Backdoor', tags: [{ name: '后门木马', type: 'error' }, { name: 'Backdoor', type: 'error' }], time: dayjs().format('YYYY-MM-DD') }, { name: 'f01ed0c8080a7acf32e5aeaf8ae3ff65', maliciousTypes: '后门木马,Backdoor', home: 'DarkKomet,Win32/Backdoor', tags: [{ name: '后门木马', type: 'error' }, { name: 'Backdoor', type: 'error' }], time: dayjs().format('YYYY-MM-DD') }, ] } const tabChange = (name) => { console.log('tabChange', name) } const tabClick = (name) => { console.log('tabClick', name) } onMounted(() => { init() }) return { basicInfoLeft, basicInfoRight, detailTitle, currentName, intelligenceLabels, topDetailList, tabs, riskLevel, confidenceLevel, openSourceTableData, openSourceTableColumn, relatedSampleTableData, relatedSampleTableColumn, relatedEventsTableData, relatedEventsTableColumn, tabChange, tabClick, } }