diff --git a/src/Frontend/src/components/HeaderVisualization/HeaderVisualizationAuthenticationResults.vue b/src/Frontend/src/components/HeaderVisualization/HeaderVisualizationAuthenticationResults.vue index 6fa7c62..4b0d437 100644 --- a/src/Frontend/src/components/HeaderVisualization/HeaderVisualizationAuthenticationResults.vue +++ b/src/Frontend/src/components/HeaderVisualization/HeaderVisualizationAuthenticationResults.vue @@ -54,23 +54,24 @@ const fullResult = computed(() => { for (const result of results) { if (result.startsWith('spf=')) { - const regex = /spf=(?[a-z]+)\s\((?[A-Za-z0-9 .]+)\)\ssmtp\.(?[A-Za-z]+)=(?[A-Za-z0-9-.]+)/ + const regex = /spf=(?[a-z]+)\s\((?
[A-Za-z0-9.:\-@ ]+)\)\ssmtp\.(?[A-Za-z]+)=(?[A-Za-z0-9-.]+)/ const match = result.match(regex) spfResult.status = match?.groups?.status - spfResult.details = match?.groups?.ip + spfResult.details = match?.groups?.details spfResult.authenticationSource = match?.groups?.authenticationSource spfResult.authenticationData = match?.groups?.authenticationData continue } if (result.startsWith('dkim=')) { - const regex = /dkim=(?[a-z]+)\s\((?[A-Za-z0-9 .]+)\)\sheader\.d=(?[A-Za-z0-9-.]+)/ + const regex = /dkim=(?[a-z]+)\s(\((?
[A-Za-z0-9 .]+)\)\s)?header\.(i|d)=(?[A-Za-z0-9-.@]+)/ const match = result.match(regex) + console.log(result) const dkimResult : DkimAuthenticationResult = { showError: false } dkimResult.status = match?.groups?.status - dkimResult.details = match?.groups?.ip + dkimResult.details = match?.groups?.details dkimResult.headerDomain = match?.groups?.headerd dkimResults.push(dkimResult) @@ -82,6 +83,18 @@ const fullResult = computed(() => { const regex = /dmarc=(?[a-z]+)\saction=(?[A-Za-z0-9 .]+)\sheader\.from=(?[A-Za-z0-9-.]+)/ const match = result.match(regex) + if (match) { + dmarcResult.status = match?.groups?.status + dmarcResult.action = match?.groups?.action + dmarcResult.headerFrom = match?.groups?.headerfrom + continue + } + } + + if (result.startsWith('dmarc=')) { + const regex = /dmarc=(?[a-z]+)\s\((?[A-Za-z0-9.= ]+)\)\sheader\.from=(?[A-Za-z0-9-.]+)/ + const match = result.match(regex) + dmarcResult.status = match?.groups?.status dmarcResult.action = match?.groups?.action dmarcResult.headerFrom = match?.groups?.headerfrom @@ -128,7 +141,7 @@ const fullResult = computed(() => {