Jan 30, 2013

SSH port forwarding

Symantec PGP decrypt a WDE drive using boot.iso

What we can do if a bootable PGP WDE drive fail to boot the OS correctly? Initially we can try to do a recovery operation using the OS bootable CD/DVD or restore to a previous known best configurations point. But think if those operations also fail to recover the OS boot process. Then the option is to reinstall the  OS. But as the drive is encrypted, we can't simply reinstall the OS on the same drive. If we do it, it will cause a data lost. Therefore, we need to decrypt the drive and install the OS. Then again encrypt the drive.

We can do two things in such a scenario.
1. Remove the drive and connect it to another PGP installed machine as a slave drive and decrypt it via the PGP desktop.
2. Use the boot.iso to boot the machine and decrypt the drive using bootable cd.

In this post I will describe how to do it using the boot.iso or bootable PGP CD.

First you need to get the correct version of the boot image (boot.iso). It is important to have the same version of the Symantec PGP software to avoid any data lost.

Best way to find the boot.iso is to burn a CD image after initial PGP desktop installation. You can get the image file from these location according to the OS.

32-bit :- C:\Program Files\PGP Corporation\PGP Desktop\bootg.iso
64-bit :- C:\Program Files (x86)\PGP Corporation\PGP Desktop\bootg.iso

Or you can download it from the Symantec website.

Then boot from the CD drive. It will prompt the initial PGP login screen. Do not enter the user name and passphrase. If you can go to the "Advance panel" go to it and try to decrypt the drive. (But in my case I haven't got a advance panel.). But if not, press F4. It will direct you to the WDRT window. Get the WDRT from the server and type it. After submitting the WDRT boot disk (CD) will try to decrypt the encrypted drive. This process will take some time (very high). Don't stop it and make sure power supply is OK.

Keep in mind if something goes wrong, it will cause a data lost and you wan't be able to reverse the operation.

Jan 24, 2013

Clean URL using .htaccess

These days most websites use databases or a content management system (CMS). Some of those web sites or systems have nice URLs like;


But some systems have URLs like;


Both URLs give the same output, but the clean URL is good for search engine optimizations and easy to remember.

If you want to retrieve data from a database according to a input given in the URL you need to use a GET request. So how a clean URL works ?

In a clean URL scenario, web server need to do a redirection. Server will redirect the clean URL request to a not clean URL. Then from the not clean URL, index page will generates the relevant content. But this redirection will not be visible to the user.

 example.com/your-random-page => example.com/index.php?q=your-random-page

So if you change the URL into something else, it will change the value of the parameter in to that like;

 example.com/something-else => example.com/index.php?q=something-else

Then the index page will generate the relevant content according to that value.

TO do these things you need to enable some web server options. First you need to enable '.htaccess'. Then you need to enable 'mode rewrite' mode. '.htaccess' is a part of a server settings file. you can specifically set web server settings via this file and if you do something wrong, that can cause a damage to the webserver too.

Place a '.htaccess' file in the root of you website and add these lines to it.

RewriteEngine On
RewriteRule ^([a-zA-Z0-9]+)$ index.php?q=$1
RewriteRule ^([a-zA-Z0-9]+)/$ index.php?q=$1