Archive

Archive for July, 2011

Compile Truecrypt from source

July 11, 2011 7 comments

Problem

You want to compile Truecrypt from source but suddenly you realize that it’s not that trivial.

Solution

Let’s install some necessary packages:

sudo apt-get install build-essential libfuse-dev libgtk2.0-dev
sudo apt-get install nasm
sudo apt-get install libwxgtk2.8-dev
# This last one is for the problem "'wx/wx.h' is not found".

Download the source code of Truecrypt (link) and extract it to a folder. I put mine here: /opt/truecrypt-7.0a-source.

From the README of Truecrypt, we need this too: “RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki) 2.20 header files (available at ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20) located in a standard include path or in a directory defined by the environment variable ‘PKCS11_INC’.

So, visit ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20 and download the .h files. Actually, you only need 3 of them; I collected their URLs here. I put these files in this directory: /opt/truecrypt-7.0a-source/PKCS11_INC. Then, register it in an environment variable:

export PKCS11_INC=/opt/truecrypt-7.0a-source/PKCS11_INC

Now you can try to compile it. Go to /opt/truecrypt-7.0a-source and execute the command make. The executable will be placed here: Main/truecrypt.

Optional

I’m not sure that this step is necessary. If you have problems compiling the source, follow these instructions too.

For a successful compilation, you might need the wxWidgets library too. Download the latest stable release (choose wxAll in the list). Mine is extracted here: /opt/wxWidgets-2.8.12.

Get Truecrypt to compile wxWidgets for you:

export WX_ROOT=/opt/wxWidgets-2.8.12/
make WX_ROOT=/opt/wxWidgets-2.8.12 wxbuild

It will create the directory /opt/truecrypt-7.0a-source/wxrelease.

Further help

Remove the binary package

If you installed Truecrypt with the binary .deb package, here is how to remove it:

sudo truecrypt-uninstall.sh
Categories: security Tags: ,

Khan Academy

I just found the Khan Academy.

The Khan Academy is an organization on a mission. We’re a not-for-profit with the goal of changing education for the better by providing a free world-class education to anyone anywhere.

All of the site’s resources are available to anyone. It doesn’t matter if you are a student, teacher, home-schooler, principal, adult returning to the classroom after 20 years, or a friendly alien just trying to get a leg up in earthly biology. The Khan Academy’s materials and resources are available to you completely free of charge.” (source)

Watch their intro on youtube.

They have lessons on computer science too.

[ via reddit ]

Categories: Uncategorized Tags: , ,

Replace accents for LaTeX

I have two simple scripts for LaTeX for working with special accented characters. They are made for Hungarian and French but they can be customized easily for other languages too.

replace_latex_accents.pl
This script allows you to write special Hungarian and French characters in a simple way (using the ISO-8859-1 (Latin-1) charset), then convert them to their LaTeX-equivalents.

Example: La'szlo' => L\'{a}szl\'{o}

replace_french_accents_to_latex.pl
This script converts a French accented text to LaTeX replacing the funny characters with their LaTeX equivalents.

Example: é => \'{e}

The scripts are available here.

Related stuff

A simple command-line media player

Problem

You have a folder on your hard drive where you store your MP3s. You would like to play these songs in a random order from the command-line with a simple command.

Solution

I have an alarm script with the exact same function; available here. Just modify the configuration part in the header to point to your MP3 folder; then launch it like this:

./alarm.py -p

Where -p stands for “play”. The script requires mplayer.

Categories: bash Tags: , ,

Manga Fox: Read Manga Online for Free

I just came across the site http://www.mangafox.com/.

Welcome, manga fans! We have the largest collection of all the popular manga scans and scanlations for you to read online, as well as a close-knit community for you to chat and make friends. Naruto or Bleach, Shonen or Shoujo, manga or manhwa, you name it! Top speed, completely free. Enjoy~

Hmmm, seems good :)

Categories: Uncategorized Tags:

securely delete (wipe) a file/partition

July 1, 2011 2 comments

Problem

I had a USB stick that I wanted to clean, i.e. even if I lose it, I don’t want anyone to be able to recover the data on it.

Solution

Removing a file with rm or formatting a partition (with gparted for instance) is not enough. There are tools that can restore deleted files. A better way is to overwrite a file/partition repeatedly with random garbage (wipe). And there is still the most secure way: smash your drive with a hammer and pour acid on it :)

shred

Shred can wipe a file or an entire partition. If you shred a partition, all data on it will be lost. If you only want to wipe the free space, you’ll need another tool. Here is how I wiped my USB stick:

# figure out the device reference of the partition:
df -h
# then wipe it:
sudo shred -n 5 -v /dev/XXX

Where -n 5 means we want to overwrite the paprtition 5 times; -v means verbosity; and /dev/XXX is the device reference of the partition.

Credits: http://www.linux.com/archive/feature/52258.

Alternatives

  • secure-delete tools (sudo apt-get install secure-delete); more info here
  • wipe (sudo apt-get install wipe); more info here
  • dban; more info here

The toolset secure-delete comes with four commands:

  1. srm (remove files/directories)
  2. sdmem (wipe memory)
  3. sfill (wipe free space)
  4. sswap (wipe swap partition)
Categories: bash, security Tags: , ,
Follow

Get every new post delivered to your Inbox.

Join 62 other followers