Monthly Archives: January 2015

How To Retrieve Blocked Gmail Attachments

If you’re like me, then you constantly find yourself sending email attachments to yourself as a mode of backup for miscellaneous files. And if you use Gmail, there will be instances when you can’t retrieve those attachments because Gmail blocks downloads of potentially harmful files.

Though Gmail does prevent you from attaching those potentially harmful files (like *.exe) to begin with, they do manage to slip past the upload scan at times, especially if they’re compressed. This is fine so long as you’re still able to download them, but sadly that isn’t always the case.

So what do you do when you need to download a backup file that Gmail has blocked you from downloading, and you’ve lost the original? Luckily, there is a workaround and all is not lost. I will demonstrate with an example below, where I needed to retrieve a *.rar file that contained an executable file.


1. Firstly, download Python v3.4.2 from here. Once you’ve downloaded the file, install the program by running the file and following the on screen instructions.


2. Open your email, and click on Show original from the drop-down menu.


3. A pop-up will appear with what appears to be garbled text. This is actually your email and attachment as a text file, encoded in base64. We will use a Python script to convert it back to binary. Copy the entire text to clipboard (Ctrl+A, Ctrl+C).


4. Paste it in a text file and save it with any generic name ending in *.txt.


5. Do the same for the script file, copy the script below:

6. Paste it in a text file.


7. Save it in the same folder with any generic name ending in *.py and Python should automatically recognise it as a Python script. If you can’t modify the file extension, you have to unhide known file extensions in Windows Explorer.


8. Run the Python script, and press Enter when prompted.


9. Depending on the file size, the attachment should appear immediately in the same location as the script and text file.


That’s it. The script works with Python 3.4.2 and can process multiple files and warns before overwriting anything.

Credits to Stefan for providing the script.

The Tan Sri

A few days ago, I attended a tahlil arwah at a neighbours place. As my family had relatively recently moved into the neighbourhood, I was still unacquainted with most of my neighbours. All I knew was that many of them were high ranking officials and accomplished people in society. It was the first time I had attended a majlis with such a large cross-section of society, with everyone from a Menteri, to a pilot, to an actress, in the jemaah. Among them were many Dato’s, Dato’ Seris and one of them was even a Tan Sri, so I heard.

After the majlis ended, I found myself like a fish out of water amongst the crowd, who were much more senior than I was, so I quietly slipped out of the hall and minded my own business in a secluded part of the house. I kept to myself as the night went by, admiring the sky alone by the verandah. It wasn’t long before I was approached by a man, who was wandering the perimeters of the house. He was clearly much older than everyone else I had seen that night. He had a pleasant look about him and was smiling when he noticed I saw him. He greeted me and asked me who I was. I happily introduced myself and returned the question, to which he associated himself in relation to the deceased.

Surprisingly, we talked for more than a while, with occasional smiles and nods in between. The man had obviously managed to find common ground between us to result in our fruitful exchange. Despite him being seemingly nearly thrice my age, the conversation carried didn’t seem forced, it was so natural. He was such an amiable person, and I was glad we talked.

Later that night, I inquired to my mom about this particular man. My mom told me that he was the Tan Sri she had mentioned to me previously, the most decorated man at the event that night. I was quite shocked and later settled with guilt, as I recalled asking him to introduce himself to me, when he obviously did not require any introduction from anyone else!

MasyaAllah, such a humbling experience, to meet such a humble man. I suppose it’s no wonder he’s a Tan Sri, a very agreeable person indeed. May his elevation in the akhirah be matched by his gradation in the dunia!

The Malays

It’s really quite astounding how much literature we have on the Malays. The Malays were both glorified and vilified as a people in history. Here are some snippets of those recordings.

Compare this:

“The intellect of the Malay race seems rather deficient. They are incapable of anything beyond the simplest combinations of ideas, and have little taste or energy for the acquirement of knowledge. Their civilization, such as it is, does not seem to be indigenous, as it is entirely confined to those nations who have been converted to the Mahometan or Brahminical religions.” – Alfred Russel Wallace. (1869). The Malay Archipelago.

“Frank Swettenham, in his book British Malaya described the Malays as a ‘shy and reserved race’ who were ‘inherently lazy’, with ‘no stomach for really hard and continuous work..’. The typical Malay was ‘hospitable, generous, extravagant, a gambler, a coxcomb…’. He was ‘Nature’s Gentleman’, blessed with singular dignity and good manners but fickle, indolent and, to borrow a phrase from Kipling’s poem ‘Recessional’, ‘a lesser breed without the Law’. – Christopher Hale. (2013). Massacre in Malaya.

To this:

“Only a few months ago there died in Perak a man who cannot be replaced. He was the Raja Muda, the cousin and natural successor of the Sultan. He cannot be replaced because he was in the prime of life, of fine character, experienced in all the affairs of State, able, energetic, just and high-principled, honoured and loved by his countrymen, and deeply respected by all Europeans who were fortunate enough to know him. It will be necessary to go to another generation to find a Raja Muda; the choice is not large, and men of the type of the late Raja Musa are rare. His loss will be keenly felt by the Sultan of Perak, who himself stands for all that is best in the Malay ruling class. Sultan Idris has all the qualities possessed by his cousin with a higher intelligence, a wider experience, and while Raja Musa was shy and retiring, the Sultan has great charm of manner and is a fluent speaker. The Sultan is a very earnest Muhammadan, without a trace of bigotry, and he is recognized as a high authority on questions of Muhammadan law and religion. In all the Malay States there is no one who, by his authority, influence, and direct assistance has done so much to promote the success of the new system of administration as Sultan Idris, on whom the Prince of Wales conferred the Grand Cross of St. Michael and St. George, when His Royal Highness visited Singapore on the memorable colonial tour of 1901.” – Frank Swettenham. (1906). British Malaya.

“The Malays, like many other peoples in history, were not idlers. Their activities in farming, industry, trade, commerce, war, and government are recorded in history. Only after the arrival of the Portuguese did the Malay merchant class decline. The Indians and Chinese immigrants were ensnared in the colonial capitalist system of production; the bulk of them remained coolies. Only a handful of them like Yap Ah Loi became successful capitalists. The immigrant coolies were left in their illiterate, backward state. They were used merely as a tool, “a mule among the nations”. The Malay refusal at the time to be exploited as “a mule among the nations”, was a rational and sound response. They attended to their own work in their own areas of interest. The accusation of indolence was merely a veiled resentment against Malay unwillingness to become a tool for enriching colonial planters.” – Syed Hussein Alatas. (1977). The Myth of the Lazy Native.