Saturday, June 16, 2012

Scam aimed at GTBank customers

Earlier on today, I got an email that appeared at first blush to be from the Guaranty Electronic Notification System (GENS). It had a HTML attachment, and immediately seemed suspect to my mind. Instead of opening the attachment, I decided to download it and take a look at the internals.

First off, let's have a look-see at the email itself:

Now, this is what it looks like in my browser:

But look at what it reveals under the hood:

After filling it out, it goes to a remarkable likeness of the GTBank site:

Here's a screenshot of the real GTBank site

There are various differences between the clone and the original. Some differences exist, however. For one, the "Internet Banking" section is on the left on the clone, but on the right on the original. Furthermore, it's hard to ignore the gigantic ad on the right of the clone, and though it doesn't show in the screenshot, the clone has the address "" in the address/omnibar.

Caveat recipient. Don't fill out anything you get in your email. Always confirm first from a bank branch at the very least before blindly submitting information on the internet.

Wednesday, June 06, 2012

Deep diving

Seems the last few weeks have had me push things. I recently got a MacBook Pro, which, for me being a longtime PC user (almost exclusively Windows, and on my crazy days, Linux) prior to getting it, was a major adjustment. There are little annoyances (in Chrome for OS X, like Chrome for Windows and Linux, Control-Enter (Return for purists) completes text in the address bar/omnibox with 'www.' and '.com'; for Firefox on OS X, it's Command-Return instead) and somewhat larger annoyances (I keep looking for Home and End keys). In both my personal (a loved one lost a friend on Sunday) and professional life (after doing Python web dev in Django, I'm trying to tackle a personal project in Flask/CherryPy/Tornado — please excuse the analysis paralysis — with SQLAlchemy; and the learning curve seems steep compared with Django).

But it's a good, even great, thing. Because it means I've a chance to cut the cruft. To grow. Not to get stuck. To make a difference. And I'm grateful for it.

Sunday, June 03, 2012

Building ReportLab on OS X with Homebrew and Freetype support

Long time, too lazy to blog. Don't ask. Moving on, I've been trying to set up my MacBook Pro as a development box for a while. Since the house I'm in is largely using Python, I've set up both virtualenv and virtualenvwrapper with the latest 2.7 Python (Lion comes with 2.7.1, latest as at the time of writing is 2.7.3), pip, distribute and whatnot.
One of the packages I wanted to install is ReportLab. Unfortunately, it kept building without Freetype support, so TrueType support was unavailable. This wasn't acceptable, so I started looking for ways to build it with FreeType support in.
According to this, I would have to download and build FreeType separately. That would not do (because I was being lazy, plus, I already had FreeType installed by Apple — I'd already tried to run brew install freetype, and Homebrew warned me that FreeType already comes with Lion in /usr/X11/include and /usr/X11/lib.
Initially, I tried adding the respective include and library paths in setup.cfg. Didn't work. Eventually, after trying seriously to grok the evil that is distutils code, I found that there is a class called inc_lib_dirs, and in its implementation of __call__(), it checks the platform, and makes a lot of calls to aDir(), setting either an include path (first argument uppercase 'I', no quotes) or a library path (first argument uppercase 'L'; again, without the quotes). I simply added new lines for the appropriate include/library, saved and ran python build. This worked, so I ran python install. Too tired to test with code. Hope it works for you.

Update: This post talks about building PIL on Snow Leopard with FreeType2 support, but the instructions also work for ReportLab. The tl;dr version is:
  1. download PIL (or ReportLab) source package
  2. unpack it
  3. change directory into the package folder
  4. create a new file called with the contents: FREETYPE_ROOT = "<freetype library path>", "<freetype header path>"
  5. run python build (or install)
Following these instructions, I was able to get PIL and ReportLab installed into my virtualenv.