aboutsummaryrefslogtreecommitdiff
path: root/Outlook Safelinks.wiki
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-12-31 01:16:21 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-12-31 01:16:21 +0100
commit6207240f54272dff698037a21d114d920680f450 (patch)
treec8f9bd81a7da7fc14e1a2584e16da79acf3417e9 /Outlook Safelinks.wiki
parentmån 26 dec 2022 11:59:51 CET (diff)
downloadwiki-public-6207240f54272dff698037a21d114d920680f450.tar.gz
wiki-public-6207240f54272dff698037a21d114d920680f450.tar.xz
lör 31 dec 2022 01:16:21 CET
Diffstat (limited to 'Outlook Safelinks.wiki')
-rw-r--r--Outlook Safelinks.wiki45
1 files changed, 45 insertions, 0 deletions
diff --git a/Outlook Safelinks.wiki b/Outlook Safelinks.wiki
new file mode 100644
index 0000000..2930f27
--- /dev/null
+++ b/Outlook Safelinks.wiki
@@ -0,0 +1,45 @@
+%title Outlook Safelinks
+
+A quick decoder for Outlooks safelinks "protection"
+
+{{{scheme
+(use-modules (web uri)
+ (ice-9 regex))
+
+(define uri (string->uri "https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgoogle.com%2F%3Fp1%3Dhello%26p2%3Dworld&amp;data=04%7C01%7Chugo.hornquist%40liu.se%7C07769d4323fa49da8ae908d9b6569ce9%7C913f18ec7f264c5fa816784fe9a58edd%7C0%7C0%7C637741305400535204%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=nJBoGaNj2Ub58jLFpsMwhEdt6DH1m%2BMbyrFa7Qj5iBI%3D&amp;reserved=0"))
+
+(define decoded (uri-decode (uri-query uri)))
+
+(write decoded) (newline)
+
+(define components
+ (map (lambda (kv)
+ (define idx (string-index kv #\=))
+ (cons (string->symbol (string-take kv idx))
+ (string-drop kv (1+ idx))))
+ (string-split
+
+ (regexp-substitute/global
+ #f (make-regexp "&amp;") decoded
+ 'pre (string #\us) 'post)
+ #\us))
+ )
+}}}
+
+
+
+{{{scheme
+(write (string-split (assoc-ref components 'data) #\|))
+}}}
+
+0 :: "04"
+1 :: "01"
+2 :: from email
+3 :: uid?
+4 :: uid?
+5 :: "0"
+6 :: "0"
+7 :: uid?
+8 :: "Unknown"
+9 ::
+10 :: "2000"