Posts

Gmail over HTTPS

I had always been wondering what is the problem with these email providers, that they don't let me view my emails over HTTPS. One of the main reasons I could think of was the increased load on the web servers where the HTTP connection terminates. They will have to spend extra CPU cycles to encrypt/decrypt the incoming and outgoing data. Similar load will be incurred on the user's machine as well. But Google provides mail over HTTPS. And that is seriously a good news. To access your email over HTTPS, instead of typing www.gmail.com, type "https://mail.google.com". Oh BTW, it is only the traffic comes from Google mail server to your desktop that is encrypted. Still the traffic between the mail servers go in unencrypted form. For e.g., if you are sending an email from your Google mail account to some account in Yahoo!, the mail will be sent in unencrypted form from Google server to the Yahoo! mail server. Added on 07/29/2008: A friend of mine working in Google told me ev...

Setting the PuTTY window title from command line

I sometimes want to set the title of my PuTTY windows, like "Editor", "Compiler", etc. to identify distinct windows. I found the following script very useful. You can add that to your ~/.bash_profile. Once you login, you can set the title to whatever you want: function wtitle { if [ "$TERM" == "xterm" ] ; then # Remove the old title string in the PS1, if one is already set. PS1=`echo $PS1 | sed -r 's/^\\\\\[.+\\\\\]//g'` export PS1="\[\033]0;$1 - \u@\h:\w\007\]$PS1" else echo "You are not working in xterm. I cannot set the title." fi } The above function will make the window title to be whatever argument you give followed by the usual user@host:workingdirectory . I think this should work with any xterm client. Not just PuTTY. (I haven't tested with any other xterm client.) For e.g. to set the window title to be ...

Changing color schemes in vim

You can change the color scheme of vim by the following command: :color The list of available color schemes could be found under /usr/share/vim/vim63/colors/ (If you are using a different version of vim then vim63 might be different for you). If you see file called blue.vim under this directory, to make use of that color scheme, you should give: :color blue If you would like to make the change permanent, add this line to your ~/.vimrc file.

Configuring the core file name pattern in Linux

First of all, you must make sure that you have set proper ulimit in your shell. You can check this by giving "ulimit -a" command. If the core file size is set to be 0, you can make it unlimited by giving "ulimit -c unlimited" . Refer to your shell's man page to know how to set this. The child always inherits the ulimit from its parent process. You can configure your system such that when an application dumps core the name of the core file has some meaningful name instead of just the bare word core . There are two files you should modify under /proc/sys/kernel configure this. /proc/sys/kernel/core_pattern - This contains pattern of the core file name. The following patterns are allowed: %% output one '%' %p pid %u uid %g gid %s signal number %t UNIX time of dump %h hostname %e executable filename /proc/sys/kernel/core_uses_pid - If this file contain...

Finding native-endian in Java

I was getting curious about if its possible to write a Java program that finds if the underlying native platform is little- or big-endian. I guess its not possible to write such a program without having part of the code in C/C++ and using JNI. If anyone reading this blog feels otherwise, please let me know. There is an API available from NIO to find out the native-endian. I think this API should use some native code underneath.

Serious security issue with IRCTC website

The login form of the IRCTC web site is being submitted over HTTP in plain text. This is a very serious issue since both your user ID and password could be sniffed by someone. One thing that I observed was that they have a HTTPS server running and this server is capable of receiving login requests. I think it was a bug in the code that the developer gave the URL as HTTP instead of HTTPS. How to overcome the issue? This is not a clean approach but works fine. You can copy and paste the URL "https://www.irctc.co.in/cgi-bin/bv60.dll/irctc/services/login.do?userName=XXX&password=YYY" in your browser. Replace the XXX with your user ID and YYY with your password. I tried to send a feedback about this to the site admin or someone in charge. Pathetic ... I could not find any link/email address in that website to do this. Hopefully someone from IRCTC will read this blog and fix the issue.

WTH is wrong with Tata Indicom

Tata Indicom has an amazing (?!) web site to manage all your accounts with them online . I don't know WTH is wrong with them, none of the login pages are being submitted over HTTPS. Yes, any n00b running a sniffer can sniff out your password and any other sensitive information you give with a little effort. On top of this, the page was submitted to an IP address, instead of a URL, which was beyond my wild imagination. I had to run a whois query on APNIC server just to confirm if I am talking to one of their servers. I am surprised how on earth Tata Indicom claims to be the number one (or one of the top) telecom service provider in India, if they don't even know the seriousness of their user's identity.