Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I decode the content of the email?

I have received an email:

Dear xxx,

Thank you. You have just ordered the ultimate treat for your taste buds.

Your yummy, lip smacking delight is being prepared with utmost love and attention at your own neighbouring Pizza Hut – Bengaluru - Airport Road....

but when I say "show original" it shows up as:

MIME-Version: 1.0
Sender: [email protected]
From: [email protected]
To: [email protected]
Reply-To: [email protected]
Date: 19 Sep 2014 19:44:26 +0530
Subject: PHD: Your order confirmation
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: base64
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - server.pizzahut.co.in
X-AntiAbuse: Original Domain - gmail.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - pizzahut.co.in
X-Get-Message-Sender-Via: server.pizzahut.co.in: authenticated_id: [email protected]

PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgVHJhbnNp
dGlvbmFsLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwx
LXRyYW5zaXRpb25hbC5kdGQiPjxodG1sIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8x
OTk5L3hodG1sIj48aGVhZD48bWV0YSBodHRwLWVxdWl2PSJDb250ZW50LVR5cGUiIGNv
bnRlbnQ9InRleHQvaHRtbDsgY2hhcnNldD11dGYtOCIgLz48dGl0bGU+UGl6emEgaHV0
PC90aXRsZT48L2hlYWQ+PGJvZHk+PHRhYmxlIHdpZHRoPSI2MDAiIGJvcmRlcj0iMCIg
Y2VsbHNwYWNpbmc9IjAiIGNlbGxwYWRkaW5nPSIwIj48dHI+PHRkIGFsaWduPSJjZW50
ZXIiIGJnY29sb3I9IiM5NjE3MDAiPjx0YWJsZSB3aWR0aD0iNjAwIiBib3JkZXI9IjAi
IGNlbGxzcGFjaW5nPSIwIiBjZWxscGFkZGluZz0iMCI+PHRyPjx0ZD48aW1nIHNyYz0i
aHR0cDovLzEwLjEyNy4yMDAuMzAvcGhpbmRpYS93ZWIvYXNzZXRzL1BISU4vSW1hZ2Vz

how was the Gmail client able to decode the content from this obfuscated text? Additionally, and this is a Gmail API specific qn: is this something the Gmail API will decode for me when returning the content?

like image 440
Debnath Sinha Avatar asked Mar 16 '23 20:03

Debnath Sinha


1 Answers

The mail is base64 encoded. Press F12 in your Browser to open up the Developer Tools, then base64-decode the message

atob("PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgVHJhbnNp dGlvbmFsLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwx LXRyYW5zaXRpb25hbC5kdGQiPjxodG1sIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8x OTk5L3hodG1sIj48aGVhZD48bWV0YSBodHRwLWVxdWl2PSJDb250ZW50LVR5cGUiIGNv bnRlbnQ9InRleHQvaHRtbDsgY2hhcnNldD11dGYtOCIgLz48dGl0bGU+UGl6emEgaHV0 PC90aXRsZT48L2hlYWQ+PGJvZHk+PHRhYmxlIHdpZHRoPSI2MDAiIGJvcmRlcj0iMCIg Y2VsbHNwYWNpbmc9IjAiIGNlbGxwYWRkaW5nPSIwIj48dHI+PHRkIGFsaWduPSJjZW50 ZXIiIGJnY29sb3I9IiM5NjE3MDAiPjx0YWJsZSB3aWR0aD0iNjAwIiBib3JkZXI9IjAi IGNlbGxzcGFjaW5nPSIwIiBjZWxscGFkZGluZz0iMCI+PHRyPjx0ZD48aW1nIHNyYz0i aHR0cDovLzEwLjEyNy4yMDAuMzAvcGhpbmRpYS93ZWIvYXNzZXRzL1BISU4vSW1hZ2Vz")

Which will give you the original mail.

like image 75
Tholle Avatar answered Mar 23 '23 20:03

Tholle