import dayjs from 'dayjs'; export const useEmailDetail = () => { 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: 'IP WHOIS' }, { title: 'IP 反查' }, { title: '开放端口' }, { title: '数字证书', disabled: true }, { title: 'Graph', disabled: true } ]) 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-zhuceren', title: '注册人', desc: '刘玲玲' }, { icon: 'icon-lianxiyouxiang', title: '联系邮箱', desc: '- -' }, { icon: 'icon-suoshuzuzhi', title: '所属组织', desc: '- -' }, { icon: 'icon-shoucizhuceshijian', title: '首次注册时间', desc: "2000-03-24 06:27:37" }, { icon: 'icon-zhucedaoqishijian', title: '注册到期时间', desc: '2023-03-24 05:27:37' }, { icon: 'icon-yumingkejiexi', 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 { detailTitle, currentName, intelligenceLabels, topDetailList, tabs, riskLevel, confidenceLevel, openSourceTableData, openSourceTableColumn, relatedSampleTableData, relatedSampleTableColumn, relatedEventsTableData, relatedEventsTableColumn, tabChange, tabClick, } }