aloneguid / bt

Browser Tamer
https://aloneguid.github.io/bt/
Apache License 2.0
134 stars 6 forks source link

Office 365 links unwrapping #36

Closed maluht closed 10 months ago

maluht commented 11 months ago

Hi Ivan

Great new feature with Un-shortening. Could you add eur02.safelinks.protection.outlook.com? Their might be more version so might be that you only need to look for protection.outlook.com.

Best Mads

aloneguid commented 11 months ago

Thanks! These URLs are not entirely shortened, the actual link is embedded within URL. The issue with un-mangling it is you might not want to do it as the link goes via Microsoft antivirus check first. So the rule has to be applied to un-mangled URL, but you really want to open the "safelinks" one. I'll have to make some changes to implement this, which would be really useful.

maluht commented 11 months ago

It would be really helpful if this was implemented. Below I did a test link for https://www.google.com, so you have a full example. I have replaced some of the info, but it still align to how the link would look.

Encoded: https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.google.com%2F%26data%3D05%7C01%7CYYY%40XXX.com%7Ce0db85sd428csdsdba492a6f7%7C8f9b88sdse4be3aae420sds42306%7C1%7C0%7C6382sds448699%7CUnknown%7CTWFasdsasdwMDAiLCJQIjoiV2luMzIiLCsdshaWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C%26sdata%3DmxTjSxm%2BOJmi3ulKDsDdsdsG07eB3IYt2McJY21U%3D%26reserved%3D0

Decoded: https://eur02.safelinks.protection.outlook.com/?url=https://www.google.com/&data=05|01|YYY@XXX.com|e0db85sd428csdsdba492a6f7|8f9b88sdse4be3aae420sds42306|1|0|6382sds448699|Unknown|TWFasdsasdwMDAiLCJQIjoiV2luMzIiLCsdshaWwiLCJXVCI6Mn0=|3000|||&sdata=mxTjSxm+OJmi3ulKDsDdsdsG07eB3IYt2McJY21U=&reserved=0

aloneguid commented 11 months ago

Relevant documentation section: https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/safe-links-about?view=o365-worldwide

maluht commented 10 months ago

Amazing work, thanks for this!