Wednesday, September 26, 2012

Winner of Enhanced Ip Lookup Account

One of my review posts has been recognized by Ip2Location team and my account has been granted with more look-ups now. I would like to share the message with readers too.

This means, as always committed towards safer internet and my passion towards de-weeding bad shrubs that go in front of me, it helps even more.

Resource File Comparer Tool

A while back to debug at my application for resource file bugs pointed by QA I used to write a console application which reads all the resource files, generate HTMLized Excel file ( :) ) to compare availability of strings and what is causing a particular language setting to behave differently in the application.

Last week, I just had an idea and a bit of time to improve upon this to create a simple (rather very simple) Windows forms application which does the following:


  1. Load the base resource file (System Locale)
  2. Generate a grid containing the key value pairs in the resource file.
  3. List matching other language files into the listbox. 
  4. As and when other languages are chosen, update the grid with the entries from the selected languages.
  5. Indicate missing keys in the grid with a different color.
  6. Provide the legendary Excel Export option as a comma-delimited file.
I have shared the application as an opensource project in Codeplex at this URL:

Sunday, September 23, 2012

Better security on the web

We do visit a lot of websites and a lot of visitors from many parts of the world initiate contact us with through the Internet medium. Optimistically speaking while a good number of visitors are good, there are a few rotten apples too. These ones involve in sabotage by indulging in some sort of spam, phishing, email (aka) cyber harassment of multiple kinds.

We can of course report these to cops. But considering the explosive penetration of Internet and comparing with the limited number of cops they may not be able to do an end-to-end investigation of every piece of case. Hence we can do our basic initiative of research into the visitors details and then equip the cops to act on it using the legal channels of redressal.

One of the valuable and reliable resources that helps tracing websites and emails is Ip2Location (http://www.ip2location.com/), which operates from Malaysia. For every visitor they give 20 lookups of IP address free. For logged on users, a daily lookup of 200 is allowed. And they do have periodic promotional offers like the one running now as illustrated below:



I am sure this is an inevitable tool for anyone for safe use of Internet. Check out and bookmark the website. Another related website I found was: 62NDS CountryIP

Thursday, September 20, 2012

Unix/Linux WhoAmI command in C#

In Linux we have an elegant and quick command to display the currently logged on user. It is called 'WhoAmI'. You can check out the manpage of this command here. I just thought would create a quick and simple C# port of the same and share it with interested users.

The code is a very simple and straight-forward console application and I hope it is also useful for beginners to learn the programming language with ease and fun.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Principal;

namespace LavanyaDeepak.UnixCommands
{
    class WhoAmI
    {
        static void Main(string[] args)
        {
            Console.Clear();

            try
            {
                Console.ForegroundColor = ConsoleColor.Green;
                WindowsIdentity objWindowsIdentity = WindowsIdentity.GetCurrent();
                Console.WriteLine(string.Format("You are currently logged on as {0}", objWindowsIdentity.Name));
            }
            catch (System.Security.SecurityException objSecurityException)
            {
                Console.ForegroundColor = ConsoleColor.DarkRed;
                Console.WriteLine(string.Format("Could not fetch currently logged on user. There was a security error: ", objSecurityException.Message));
            }
            catch (System.Exception objGeneralException)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(string.Format("Could not fetch currently logged on user. There was a general error: ", objGeneralException.Message));
            }

            Console.ReadKey();
        }
    }
}

Saturday, September 08, 2012

Enabling Serverside Includes on WAMP

WAMPS (Windows Apache MySQL PHP with SSL) is a terrific server that you can use on your desktop with a powerful database and amazing webserver with scripting/programming abilities. However the default configuration prevents SHTML pages from being served.

Here is the quickest layman's workaround for the same. Create a simple .htaccess file in the www folder of WAMPs with the following content


# Enable Server Side Includes
Options +Includes

# Configure file extensions for SSI
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

Now create a test page like index.shtml with the following contents:




You should now see a parsed output like below on the browser when requesting the page:

Saturday, 08-Sep-2012 12:18:19 Eastern Daylight Time

[Imported from Blogdrive]Online Virus Scanners

Online Virus Scanners Virus Scanners are no longer difficult to install, tedious to configure. There are easy to use Online Virus Scanne...