Skip to content

These days you really need a strong, unique password for almost everything you do online. To make matters even worse for the average user, security nuts will tell you that you actually need a different password for essentially every account you hold. Why? Consider the following scenario:

Little Timmy signs up for Facebook using his super secret password @wesomeS@auce3!. This password is so strong and good that even he can hardly remember it. Then he wants a Twitter account so he goes and signs up there using the same password. Some time passes and Timmy’s Twitter account is hacked. Using his associated e-mail address they try the same e-mail and password on Facebook (because it is a popular website that most people belong to) and lo and behold they have access. Little Timmy’s virtual life falls apart around him.

Think I’m being paranoid? Take a look at these examples and adjust your tin foil hat accordingly.

What to do?

So what can you do about it? Well for one don’t use the password above because now it is all over the internet. For two use strong unique passwords for each website you care about. What do I mean by that? Well in the above example Timmy clearly cared about both Facebook and Twitter so he should have used different passwords for each. That way when his hypothetical Twitter account became hacked the attackers couldn’t use the same password to gain access to his Facebook account. That said it is always good to have a throw away password or two to use on those one-off websites that you will either never visit again or don’t care if they get compromised. Third either remember all of these unique passwords in your super genius conehead sized brain or use a password safe to make it easy on yourself.

Password Safes

A password safe is essentially a program that allows you to maintain a number of different passwords while only having to remember one. Essentially you enter a master password into the program and this acts as your key to unlock all of your others passwords. That way you (technically) only have to remember one password at a time (the master password) and you only have one password to change on a regular basis (although you should obviously refresh your other passwords every so often as well). A number of these programs exists (such as LastPass, etc.) but personally I prefer KeePass.

KeePass

KeePass comes in two flavours: version 1.x (which is technically now legacy) and version 2.x (which is current). Beyond feature set the biggest difference is that version 2.x requires the .NET Framework (or Mono) and version 1.x doesn’t. For the purposes of this post I’ll be focusing on version 2.x.

KeePass has a number of great features that make it indispensable in my day-to-day computing life. While the full feature list is actually quite long I’ll just list the most useful or important ones here:

  • Open source which means that the source code has been looked at and checked over for any sort of backdoor or other nonsense that a potentially evil author would code into it. This is very important when you’re considering placing all of your password eggs in one proverbial basket.
  • When you create a new password entry you can store any sort of arbitrary information along with it:

    New Password Entry

    New Password Entry

  • All of your passwords are stored completely encrypted including all comments, website URLs and user names. This is incredibly convenient because it allows you to safely do things like create an entry containing you credit card information. Never again will you have to hunt down your wallet to make that spur of the moment online purchase!
  • It is portable – you can run it straight off of a USB stick, no installation required!
  • Rule based, strong password generator. Having a long, strong, password is very important but remembering one is very hard. Instead why not have KeePass generate a per-website, completely random, strong  password for you? Using a website that for some reason doesn’t like special characters or only allows up to a 12 character password? No problem just change the rule set you use when you generate that particular password.
    Password Generator

    Password Generator

    Here are some examples of random passwords I just generated now:

    Lots of random passwords!

    Lots of random passwords!

  • Cross-platform – KeePass has implementations on almost every platform. Version 1.x runs on Windows, Mac and Linux (via KeePassX). Version 2.x runs on Windows, Mac and Linux (using Microsoft’s .NET or the open source Mono). There are even versions of it for Android, iPhone and others.
  • Auto-type – this is by far the best feature. Even if you, for some reason, didn’t want to use any other feature that KeePass has to offer, its Auto-type functionality alone is worth the install. Essentially you tell KeePass what window to look for (for instance Firefox browsing my bank’s website) and how it should type things for you (usually user name, tab, password, enter). Then you set up some key combination you want to use (like Ctrl + Alt + A) and KeePass does all of the typing for you. Now when I want to enter one of those crazy strong and super random passwords I don’t have to type it out or even copy and paste. I simply click my mouse in the user name field and press Ctrl + Alt + A. The genius of this is that it can work for all accounts on your computer not just website ones – for instance I use it at work to keep track of my passwords for our internal programs.

WHO IS PAYING YOU?

All of this praise may make it seem like I’m getting paid to write this article but that isn’t the case (not that I would turn the money down mind you *hint hint*…). KeePass is just one of those programs I use daily that does so many things right I can’t help but like it. So in conclusion give it, or a similar password store, a try and make your online presence more resilient to password hacking. Let me know which password safes you think are awesome.

Saw this somewhere and figured I would post it before I lost it. Here is a very easy and simply way to move a file in Java without using the new-ish nio APIs.

File srcFile = new File(…some file to move…);
File destFile = new File(…where to move the file…);

srcFile.renameTo(destFile);

That’s it. Pretty simple. In fact it is actually shorter than the nio way of doing things

 FileChannel in = new FileInputStream(source).getChannel();
FileChannel out = new FileOutputStream(target).getChannel();

in.transferTo(0, in.size(), out);

out.close();
in.close();

// Delete source file

Although I haven’t benchmarked them to see if there are any performance differences.

Update: I should have mentioned it when I wrote the original post but, as pointed out by Partha in the comments, there are a few gotchas with this method. As always check the documentation and test to make sure that it will work for your individual needs.

If you’re like me, and you probably are, you do a terrible job of backing up your digital files life on a regular basis. Thankfully some smart people out there have made it awfully convenient to set up a backup system once and then more or less forget about it. My personal tool for the job is Areca Backup – while it is not without its flaws I find it easy to be an use, feature rich, and cross-platform (essentially anything that runs Java) backup solution.

So why do you have to fix it?

Remember when I said it was not without its flaws? Areca, while written in Java, makes use of SWT for it’s graphical interface in order to get a good solid native feel. This is normally not an issue except that more and more people are running 64-bit Windows operating systems and more and more people are installing the 64-bit version of the Java Runtime Environment (JRE) instead of the 32-bit version. Why does this matter? Well SWT uses native libraries, in this case Win32 libraries, to create the application interface and Areca only ships a 32-bit version. This means that when you try and run the application on a 64-bit version of Windows running 64-bit Java it will simply not start. The reason is technical but essentially 64-bit Java is not compatible with loading 32-bit native libraries.

So how do you fix it?

The fix is actually very easy. While Areca doesn’t ship a 64-bit version of their application, all you really need to do is get a 64-bit version of the SWT libraries. Here are the steps to get this to work:

  1. Go to http://www.eclipse.org/swt/ and under the Releases section click the more…link (under Stable).

    Click the “more…” link

  2. Download the SWT Binary zip file for Windows (x86_64) (version 4.2.1 as of this writing).
  3. Open the zip file and extract the swt.jar file (in the root of the zip) to the lib folder of your Areca Backup installation directory replacing the swt.jar library that was there. Usually this means you extract swt.jar to C:\Program Files (x86)\Areca\lib
  4. Start Areca normally – you are now using 64-bit native libraries with your 64-bit JRE on your 64-bit Windows operating system.

Hopefully this helps you out and, more importantly, allows you to backup your precious digital files.

Here are some of my recent posts from over at The Linux Experiment.

Enter the shoes of El Presidente as you try and turn the island nation of Tropico into a beacon for the world!… or something. Loads of humour, a ridiculous plot mixed with over-the-top steroetypes and great SimCity-like gameplay had me hooked right from the beginning.

The game follows the plot of El Presidente as he (you) try and make the best island paradise possible. Along the way you need to balance the needs of the Capitalists, Communists, Intellectuals, Nationalists, Loyalists, Militarists and more, or else!, all while making sure you hide enough money away in your Swiss bank account. The game is full of great humour and better gameplay spanning 20 missions (+ DLC) that makes for a lot of fun packed into one game.

With 20 missions, each of which took me 1-2 hours to beat, this game is well worth your money. I also opted for the expansion pack (Modern Times) which added an additional bunch of mission. This is definitely one of the best PC to console ports of this genre ever made – the controls usually work great (with the exception of  paging through menu items with the D-pad, which can be sucky sometimes). Overall I highly recommend picking this game up if you are at all interested in this type of genre.

My review: Great
Pick it up for: Any Price
GameRankings.com score: 78.91%
Metacritic score: 77 / 100
Wikipedia Link

See more games I’ve written about here.

Dead Space is an action horror game in the vein of Resident Evil or Silent Hill. I can honestly say that very few games have scared me, Dead Space however had me jumping more than once.

This game is not only gory, gruesome and violent but it is also quite often shocking as well. Things jump out at you, loud frightening music comes out of nowhere and all the while you are forced to dismember your enemies in order to defeat them. This means that while you are jumping back in your seat and trying to run away from the monsters on screen you also have to have almost perfect aim to take down the bad guys. It all adds up to one of, if not the, most intense games I have ever played. The kind of game that keeps your heart beating strong and loud long after you’ve turned it off.

Cut off the limbs to survive

Usually I’m not a major fan of horror games but Dead Space is so well done that it is easily as much of a AAA title as anything else on the market. I highly recommend this game to anyone who can stand being scared for the length of this game’s excellent plot. Just don’t come crying to me when you can’t sleep at night.

My review: Great
Pick it up for: Any Price
GameRankings.com score: 88.96%
Metacritic score: 89 / 100
Wikipedia Link

See more games I’ve written about here.

Ever wanted your computer to be on when you need it but automatically put itself to sleep (suspended) when you don’t? Or maybe you just wanted to create a really elaborate alarm clock?

I stumbled across this very useful command a while back but only recently created a script that I now run to control when my computer is suspended and when it is awake.

#!/bin/sh
t=`date –date “17:00″ +%s`
sudo /bin/true
sudo rtcwake -u -t $t -m on &
sleep 2
sudo pm-suspend

This creates a variable, t above, with an assigned time and then runs the command rtcwake to tell the computer to automatically wake itself up at that time. In the above example I’m telling the computer that it should wake itself up automatically at 17:00 (5pm). It then sleeps for 2 seconds (just to let the rtcwake command finish what it is doing) and runs pm-suspend which actually puts the computer to sleep. When run the computer will put itself right to sleep and then wake up at whatever time you specify.

For the final piece of the puzzle, I’ve scheduled this script to run daily (when I want the PC to actually go to sleep) and the rest is taken care of for me. As an example, say you use your PC from 5pm to midnight but the rest of the time you are sleeping or at work. Simply schedule the above script to run at midnight and when you get home from work it will be already up and running and waiting for you.

I should note that your computer must have compatible hardware to make advanced power management features like suspend and wake work so, as with everything, your mileage may vary.

It is a pretty common practice to use the command dd to make backup images of drives and partitions. It’s as simple as the command:

dd if=[input] of=[output]

A while back I did just that and made a dd backup of not just a partition but of an entire hard drive. This was very simple (I just used if=/dev/sda instead of something like if=/dev/sda2). The problem came when I tried to mount this image. With a partition image you can just use the mount command like normal, i.e. something like this:

sudo mount -o loop -t [filesystem] [path to image file] [path to mount point]

Unfortunately this doesn’t make any sense when mounting an image of an entire hard drive. What if the drive had multiple partitions? What exactly would it be mounting to the mount point? After some searching I found a series of forum posts that dealt with just this scenario. Here are the steps required to mount your whole drive image:

1) Use the fdisk command to list the drive image’s partition table:

fdisk -ul [path to image file]

This should print out a lot of useful information. For example you’ll get something like this:

foo@bar:~$ fdisk -ul imagefile.img
You must set cylinders.
You can do this from the extra functions menu.

Disk imagefile.img: 0 MB, 0 bytes
32 heads, 63 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x07443446

        Device Boot      Start         End      Blocks   Id  System
imagefile.img1   *          63      499967      249952+  83  Linux
imagefile.img2          499968      997919      248976   83  Linux

2) Take a look in what that command prints out for the sector size (512 bytes in the above example) and the start # for the partition you want to mount (let’s say 63 in the above example).

3) Use a slightly modified version of the mount command (with an offset) to mount your partition.

mount -o loop, offset=[offset value] [path to image file] [path to mount point]

Using the example above I would set my offset value to be sector size * offset, so 512*63 = 32256. The command would look something like this:

mount -o loop, offset=32256 image.dd /mnt/point

That’s it. You should now have that partition from the dd backup image mounted to the mount point.

I recently re-built an older PC from a laundry list of Frankenstein parts. However before installing anything to the hard drive I found I wanted to check it for physical errors and problems as I couldn’t remember why I wasn’t using this particular drive in any of my other systems.

From an Ubuntu 12.04 live CD I used GParted to to delete the old partition on the drive. This let me start from a clean slate. After the drive had absolutely nothing on it I went searching for an easy way to test the drive for errors. I stumbled across this excellent article and began using badblocks to scan the drive. Basically what this program does is write to every spot on the drive and then read it back to ensure that it still holds the data that was just written.

Here is the command I used. NOTE: This command is destructive and will damage the data on the hard drive. DO NOT use this if you want to keep the data that is already on the drive. Please see the above linked article for more information.

badblocks -b 4096 -p 4 -c 16384 -w -s /dev/sda

What does it all mean?

  • -b sets the block size to use. Most drives these days use 4096 byte blocks.
  • -p sets the number of passes to use on the drive. When I used the option -p 4 above it means that it will write/read from each block on the drive 4 times looking for errors. If it makes it through 4 passes without finding new errors then it will consider the process done.
  • -c sets the number of blocks to test at a time. This can help to speed up the process but will also use more RAM.
  • -w turns on write mode. This tells badblocks to do a write test as well.
  • -s turns on progress showing. This lets you know how far the program has gotten testing the drive.
  • /dev/sda is just the path to the drive I’m scanning. Your path may be different.

Fight Night Round 4 is a very realistic boxing game that is somehow both a simulation and a gritty fighting game. You can literally feel the blows as your fighter takes on the best of the best the sport has to offer.

The game has also done something interesting where it has decided to not use a heads up display (H.U.D.) at all. So rather than having a health bar you have to instead rely on the subtle vibration in the controller and the look of exhaustion on your fighter’s face. The career mode is also interesting, allowing you to train up your various skills using classical boxing training techniques and equipment like a punching bag or speed bag. Flight Night also has a unique way of controlling the game. Instead of mashing buttons, you use both of the controller’s sticks: one for movement and one for punching.

Ouch!

I’m not even a huge fan of boxing and I found this game quite entertaining. Not only that but it is in a class of its own graphically. Good looking, fun and with a rather in-depth career mode it’s easy to see why Fight Night is so popular.

 

My review: Surprisingly Good
Pick it up for: Cheap
GameRankings.com score: 87.25%
Metacritic score: 87 / 100
Wikipedia Link

See more games I’ve written about here.