Thursday 26 December 2013

Dear Research Scholars,

       We are providing complete solutions for the Research Scholars ( Identifying the Problem, Experimentation, Implementation and Publishing Papers) 
in below advanced Technologies
1)Java/J2EE,Dotnet
3)NS2,Glomosim,
4)MATLAB,Simulink,Power Electronics.


Solutions for Research in:
(1) Computer Science
(2) Communication
(3) Networking/ Network Security
(4) Mobile Computing
(5) Image Processing
(6) Wireless Communication

Contact: ranjith.rti@gmail.com,ieeeprojects2008@gmail.com

Black Hole

Black Hole Attack in Wireless Ad-Hoc Networks

One of these attacks is the Black Hole Attack against network integrity absorbing all data packets in the network. Since the data packets do not reach the destination node on account of this attack, data loss will occur.
There are lots of detection and defense mechanisms to eliminate the intruder that carry out the black hole attack. In this work, we simulated the black hole attack in various wireless ad-hoc network scenarios and have tried to find a response system in simulations.
The below links are prepared for the student who wants to study about security in Wireless Ad-hoc Networks and coders who write in NS2. You can learn how we implement a new Protocol to Ad-hoc Wireless Network in NS2 with master thesis. In the Journal, there are detailed results about the subject. The C++ Code of the Black Hole Attack and the Intrusion Detection System are in the below links. You can implement the codes, fallowing the steps in the master thesis.
* Upon request, I add below the files, Blackhole and Greyhole attack with IDS solution protocols for NS2. You can not compile ns2 putting these files under appropriate folder in NS2. These files dont work as you change whole ns2 according to the information at thesis.
In addition, Cygwin (and the other Linux versions) and NS2 is not installed no longer in my computer. So that, I cant answer, your request about installation error. To understand the error you encountered, I need to analyze the codes. And also, I compile the codes in NS 2.6 under Cygwin. Same code may give error in other versions. This is my request, please dont ask me the errors you encountered.
ContentLink
Master Thesis[Abstract] [Özet]
Simulation of Black Hole Attack in Wireless Ad-Hoc Network
Southeastcon JournalPerformance analysis of ad hoc networks under black hole attacks
C++ Code“Black Hole Attack to AODV Network” in NS2
File size: 36.219 bytes MD5: d30b7c6a6047607d7afe80a2df35e8d5
C++ Code“IDS Solution for Black Hole Attack” in NS2
File size: 35.459 bytes MD5: ef8a95e32d74b48c2fe1e5706a3fa304
Zip file“Black Hole Attack” in NS2
File size: 46.696 bytes MD5: a9fe75f1d3d361aa9745445aa8f606e3
Zip file“Grey Hole Attack” in NS2
File size: 37.850 bytes MD5: 775a99740b8f185a15c5655f76b67c40
Zip file“IDS Solution for Black Hole Attack” in NS2
File size: 45.835 bytes MD5: dc5b7502d58cfaaeb62789d5795e9fa8

Complete Network Simulator-2[NS2] Course
Course content
Fundamental aspects of Network simulator2.
Linux Environments & Commands
Languages’: C++, TCL
Network Animator Simulation
Xgraph Simulation
Wired Domain
   Design of wired network,
   Node Creation, link creation,
   Data transfer and results.
  Creation of new Protocol
Wireless Domain
Design of Wireless Networks
MAC protocols
Routing Protocols
Node Configuration
Data Transfer
Creation of New protocol

Duration: One Month                                  Place: Chennai,India
We will plan support online course of NS2, any query contact
Contact For more details:
Email@ ieeeprojects2008@gmail.com

Quickest Way Shutdown (Restart or Hibernate)

I have to admit when I first started using Windows 8 and tried to shut it down for the first time I was a little frustrated. Even after I learned how to properly shutdown the system, I wasn't really happy with any method I found, until I came up with the solution below.

Utilizing a built-in feature of the Windows application shortcut you can execute any of these operations with shortcut keys. This feature is mostly forgotten, and has literally been around for decades.
  • On an empty area of the Windows desktop, right-click and select New > Shortcut. When the 'Create Shortcut' dialog box appears, typeshutdown /s /t 0 and press the Next button.
    • to restart the computer, use: shutdown /r /t 0 
    • to hibernate the computer, use: shutdown /h /t 0
    • to log-off of the current session, use: logout 
  • Give the shortcut a name, and then press the Finish button. 
  • Right-click the new shortcut icon, and select Properties.
  • In the Properties window, click in the box next to the Shortcut key.  Type in your desired shortcut. For example, press CTRL+ALT+S (or anything else you want, personally I use CTRL+ALT+SHIFT+S to help avoid accidentally shutting down the computer).
  • Press the OK button. 
Now all you have to do is press the shortcut key you created, and the computer will perform the operation you selected. To delete the keyboard shortcut, open its file properties dialog box click the box next to 'Shortcut key', and press the Delete key.

Note: This trick can be used on just about any application shortcut, and in most versions of Windows.

Bonus Tip: another quick way to shutdown Windows is to click an empty area of the desktop and press ALT+F4.

Windows 8: TCP/IP Addressing (Static and Dynamic)

In Windows, you can have one of two types of IP addresses: dynamic or static. Dynamic IP addresses are temporarily assigned to a network device when their requested, and is generally done during the boot process. The network service that assigns dynamic IP addresses is known as DHCP. While static IP addresses have to be manually assigned to a device by a systems administrator, and are meant to be changed infrequently.

Dynamic IP addresses are the most common method of assigning an IP address to a network based device (such as a computer, printer, etc) because it reduces the network administration overhead. Today's office and work force are in a constant state of flux. People with mobile devices (such as tablets, smartphones, and laptops) will move from location to location, even desktop users can get moved around within a company on a semi-regular basis.
Note: If a Windows client makes a DHCP request for an IP address and doesn't get a reply in a timely manor, then it will switch to using Automatic Private IP Addressing (APIPA). APIPA is a private IP address range (169.254.0.0 to 169.254.255.255) that allows devices on a network using this address range to communicate with themselves. To configure this service, click on the Alternate Configuration tab in the Internet Protocol (TCP/IP) dialog.
If all devices used a static IP address, it would cause a network administration nightmare, they would all have to be changed every time a device was moved.  Most static IP addresses are assigned to servers or network based devices like routers or DNS servers. These devices need a static IP address because other devices on the network depend on knowing how to contact them.

To configure the TCP/IP addressing (dynamic or static) in Windows, follow the instructions below:
  • From the Start screen, type Network and click Settings on the right.  Click the Network and Sharing Center icon.  In the left pane, click theChange adapter settings link.
  • Right-click the active network connection (note: this selection can change between systems depending on the equipment that is installed), and select Properties.
  • Select Internet Protocol Version 4 (TCP/IPv4) [or Internet Protocol Version 6 (TCP/IPv6) depending on how your network is configured] and the press the Properties button.
From here you can select one of two options, Obtain an IP address automatically(dynamic) or Use the following IP address (static). If you're using a static IP address you need to know the following information: unique IP address, subnet mask for the network, IP address of the default gateway, and the IP addresses of the primary and secondary DNS servers. When you're done press the OK button twice.

Networking tips:

  • To find the TCP/IP address of the local computer, from the command prompt type: IPCONFIG /ALL.
  • To request a new DHCP address, from an administrator command prompt type: IPCONFIG /RELEASE and then type: IPCONFIG /RENEW 

 (Advanced) How to Find the MAC Address of Remote Computer

Every device on a TCP/IP network has a unique number assigned to it called the MAC (Media Access Control) address. The MAC address is used by the network hardware such as routers, switches, etc. to send traffic from one device to another device on your network.

Your computer uses a service called ARP (Address Resolution Protocol) to resolve and track the TCP/IP and MAC address of the remote devices that you're communicating with. This information is handy for doing semi-low level network troubleshooting. It can also be used for granting or denying permissions to a network segment or device on that network.

To determine the MAC address of a remote device:
  • Open the MS-DOS prompt (From the Run... command, type "CMD" and press Enter).
  • Ping a remote device that you want to find the MAC address (for example: PING 192.168.0.1).
  • Type "ARP -A", and press Enter.

Microsoft Windows XP [Version 5.1.2600] 
(C) Copyright 1985-2001 Microsoft Corp.

C:\WINDOWS>arp -a


Interface: 192.168.1.100 --- 0x10004 
Internet Address Physical Address Type
 
192.168.1.1 aa-fb-c8-34-da-7a dynamic

Windows 8: Managing the Send To Menu

The Send To menu is a very useful context menu. This feature gives you the ability to right-click on any file and perform a specific action, such as sending a file to the desktop or another location. You can also send a file to a blank e-mail, so that it can be mailed to a friend. The options are not limitless, but they're pretty extensive.

To access the Send To menu, do the following:
  • From the Run... command (WinKey + R) Open field or the File Explorer address bar type%userprofile%\AppData\Roaming\Microsoft\Windows\SendTo and press the Enter key.
  • From here you can create new folders, shortcuts to applications (such as Notepad), and more. If you create a shortcut to an application, make sure that it can handle those file types you want to send it.
If you ever want to remove some items from the Send To menu, just open up the folder and delete the shortcuts you don't want.

Windows 8: File Explorer Keyboard Shortcuts

Most of us use Window's built-in File Explorer application (formerly known as the Windows Explorer) to manage files, folders and drives that are accessible by the local computer.

If you prefer using the keyboard to control an application, here are some of the better keyboard shortcuts to know for the File Explorer.
  • Ctrl + F: Open up the search pane. 
    • Build a complex search query using the controls in the pane to find specific files.
  • Alt + Up Arrow (or backspace): Go up a folder.
  • Alt + Right Arrow: Go forward (takes you back into your folder browsing history)
  • Alt + Left Arrow: Go back (takes you back into your folder browsing history)
  • Alt + D: Focus the address bar and select the current path.
  • Alt + P: Shows the Preview pane
  • Alt + Shift + P: Shows the Details pane
  • Alt + Enter: Properties of the selected file
  • Ctrl + Mouse wheel: changes the folder view type.
  • Ctrl + Shift + N: Creates a new folder at the current location
  • Ctrl + F1: Opens or closes the ribbon at the top of the window 
  • F4: Opens dropdown menu in the address bar.
  • F11: Puts the File Explorer into full-screen mode.
Note: The Windows File Explore tracks the folder browsing history, similar to the way Internet Explorer's tracks your browsing history. Every folder or network path you visit is remembered, you can then use the Alt+Left or Right arrow to move through the folder location history that were previously visited.

 Windows 7- speed up tips

The Microsoft Windows 7 operating system has been designed for delivering better speeds than its predecessors. However, as time passes by, the laptop/PC might tend to get slower. This is not exactly the fault of the OS. As the matter of fact, it is a common problem faced by many operating systems.
windows 7 performances tips
The major reasons for this are accumulation of junk in the system or a highly stuffed hard drive or running of too many unnecessary services and programs. Here we shared a few essential tips that can help speed up Windows 7 performance on laptops or computers. Hope it helps!

Visual And Sound Related

1. Using Minimal Visual Effects

Disabling certain (or all) visual effects can definitely enhance performance. To disable visual effects, do the following:
  1. Press Windows key and while holding it down, press Pause/Break key.
  2. In the window that appears, click on Advanced system settings in the left side pane.
  3. In the Advanced tab, under Performance Section, click on Settings
  4. In the Performance Options window (refer figure) that appears, under Visual Effects tab, disable the options that you do not need. Or simply selecting ‘Adjust for best performance‘ will disable all options.
  5. After disabling the option, click Apply and then OK.
Doing the above might make the screen less attractive. But, the performance will surely get a boost.
performance options

2. Using Minimal Sound Effects

For disabling sound effects, do the following:
  1. Click Start. In the search box type mmsys.cpl and press Enter
  2. In the Sound window (refer figure) that appears click on Sounds tab
  3. Set the Sounds scheme to ‘No Sounds
  4. You could set only the essential sounds if needed in the Program Events, by selecting the specific event and then choosing the sound from the Sounds drop-down menu below.
  5. You can as well disable the "Play Windows Startup sound" option.
  6. After the settings are done, click Apply and OK.
sounds

Software And Services Related

1. Run A Trusted Anti-Virus Program

Ensure that you have a good anti-virus software loaded on your laptop/computer. This will ensure that no malware or spyware gets planted in your system. Without such protection software, there are chances of third party malware and virus being installed or stored on your system, causing harmful effects and also eating up precious space.

2. Install Only Essential Software

Ensure that you install only that software which you need. If you install any trial software and find out that you don’t really need it, uninstall and delete it immediately. Else, they might hog precious disk space, RAM and processor cycles. If you’ve installed a software, which you are unable to get rid of, and which is hampering the normal functioning of your laptop, then you might have to format your hard drive. Be aware that formatting your hard drive might wipe out all your data. Therefore it is best you take a back-up before going ahead with formatting.

3. Disable Or Make Unneeded Services Manual

Some processes and services, which might not really be necessary, are by default made to start automatically once the system starts up. They will consume RAM as well as the processor’s attention, slowing down other important tasks. It is best to disable them. For this, do the following:
  1. Click Start. In the search box type services.msc and press Enter
  2. Go to Services & Applications > Services. You’ll see the Services window (refer figure).
  3. Right-click on a service that you wish to set to manual or disable. If the service is already started, Stop it first.
  4. Once the service is stopped, again right-click on it and select Properties.
  5. In the Startup type, you can either set the service to Manual, if you would be using it later, orDisable it, if not needed.
  6. Once done, you can close the window.
services

4. Disabling Unwanted Start-Up Programs To Speed Up System Start-Up

Some programs are set to start during system start-up. These might slow down the start-up process. Programs that are not really needed during start-up can be disabled. For this, do the following:
  1. Click Start. In the search box type msconfig and press Enter.
  2. In the System Configuration window (refer figure), go to Startup.
  3. Uncheck the box next to those processes that are not important for start-up. This will disable them.
  4. Once you’ve disabled the processes, click Apply and OK.
system configuration

Hard Drive Related

1. Clean Up The Hard Drive

Remove unwanted files, like temp files, downloaded program files, recycle bin, etc. You could useDisk Cleanup option to do this, as follows:
  1. Click Start > All Programs > Accessories > System Tools > Disk Cleanup
  2. The system will first calculate how much space can be freed up this way. In the Disk Cleanupwindow (refer figure) that appears, select the files in that need to be deleted under the Files to delete list.
  3. For deleting ‘System Restore‘ and ‘Shadow copy‘ files, click "Clean up system files" and then on "More Options" tab
  4. Finally click OK. You’ll be prompted again before the deletion. Click Yes.
disc cleanup

2. Enable Write Caching On Device

This is an option which allows the OS to flush changed data to the hard disk when the system is idle, so that performance is not affected when in use. For enabling this, do the following:
  1. Press Windows key and while holding it down, press Pause/Break key.
  2. In the window that appears, click on Device Manager in the left hand pane.
  3. In the next window that appears, expand Disk drives.
  4. The drop-down list will show the hard drive. Right-click on it and select Properties.
  5. Click the Policies tab in the Device Properties window (refer figure).
  6. Check the box next to "Enable write caching on the device"
  7. You can as well check the box next to "Turn off Windows write-cache buffer flushing on the device" and then click OK.
virtual HD
Note: However, there is one disadvantage in enabling these options – if there is a power outage or a system crash, data might be lost or corrupted. If you have a secondary power supply, like a UPS, you could go ahead with checking these options.

3. Perform Disk Defragmentation

When there is no sufficient space to store in a hard drive, the OS splits the file into parts and stores it in different areas on the hard drive. Defragmenting allows all these parts to be stored in contiguous memory locations. For defragmenting disk do the following:
  1. Click Start > All Programs > Accessories > System Tools > Disk Defragmenter
  2. In the window (refer figure) that appears, click on the drive that you want to defragment and then click Analyze disk.
  3. This will estimate the time required for the process. When done click on Defragment disk.
  4. Once done you can either View Report or click Close.
disk defrag
These pretty much sum up the small things that you can do, to make a big difference to your Windows 7′s performance. If you have some personal tips you’ve done yourself to improve the performances, we’d like to hear from you.

Friday 6 December 2013

C

Program  to Print its Own Source Code-: C

C Program to Print its Own Source Code 
Ever wondered how to write a C program to print its own source code? Well, here is the source code of a C program that when executed will print its own source code. In other words, the output of this program is exactly same as its source code.
Here’s the program:

#include<stdio.h>
char *program=”#include<stdio.h>%cchar *program=%c%s%c;%cvoid main()%c{%cprintf(program,10,34,program,34,10, 10,10,10);%c}”;
void main()
{
printf(program,10,34,program,34,10,10,10,10);
}

Enable or Disable Hibernation in Windows 7

Enable Hibernation in Windows 7 
Enabling or Disabling the “Hibernate” option in Windows 7 or Vista is not as simple as it used to be in Windows XP. For Windows 7, a different approach has to be followed to accomplish the same job.
In this post you will find the information on how to enable or disable the Hibernate option in Windows 7.
Hibernation is a power saving option which was designed primarily for laptops. Unlike the “sleep mode” which puts the open documents and files into the memory, hibernation puts all the open files and documents on to the hard disk and shuts down the computer without drawing even a small amount of power.
Thus, hibernation becomes an excellent way to save power and resume the Windows back to the state where it was left off. If you really want to use this feature on Windows 7 then you need to enable this option. This can be done as follows:
Step-1. Open the Command Prompt with “Administrator rights”. To do so, type cmd in the Start menu and then hit Ctrl+Shift+Enter.
Step-2. Now type the following command in the command prompt and hit Enter.
powercfg /hibernate on
Step-3. Type exit and hit Enter to close the Command Prompt.
Now you should see the “Hibernate” option in the Start menu. If you still do not see the “Hibernate” option, then perform the following steps:
  1. Type Power Options in the Start menu and hit Enter.
  2. In the left pane, open the link labeled “Change when the computer sleeps” and then open the link “Change advanced power settings”.
    Now a small window will pop-up as shown below:
    Enable Hibernation in Windows 7
  3. Now expand the Sleep tree and turn off Allow Hybrid Sleep as shown in the above screenshot.
  4. You should now see the “Hibernate” option appearing in the Start menu.
I hope you like this post. If you have anything to say or have difficulties following this post, please pass comments. Cheers :)

Customize Start Menu Button in Windows 7

Customize Win 7 Start Menu 
Have you ever wondered to know how to customize the start menu button in Windows 7? Are you bored of seeing the same old start menu button that is there from the time of Vista? Well, it is possible to spice up your copy of Windows 7 by giving a new look to the start menu button.
In this post, I will show you how to do that in an easy to follow step-by-step manner.

Tools that you need:

  1. Resource Hacker
  2. Custom Start Menu icons (images). It mush be of the size 54×162 with a .bmp extension. which looks something as follows: Start Menu Icon
    As shown in the above image, it must be in the following order:
    1st Image: When the button is not in use.
    2nd Image: When the mouse pointer is over the button.
    3rd Image: When the button is clicked.
I have created a few customized buttons which are ready to use. You can download them from the following link:
Start Menu Buttons Download
Once you have all those resources ready, you can start the customization process as follows:
  1. Take the ownership of the file “explorer.exe“ which is located in the Windows Folder (Most likely in C:\Windows).
  2. Open the Resource Hacker Tool.
  3. Go to File menu and click on Open. Now load the file “explorer.exe” into the Resource Hacker.
  4. Expand Bitmap branch in the left pane.
  5. Now expand 6801 option, right-click on 1033 and select Replace Resource option.
  6. A new window appears. Click on Open file with new bitmap button.
  7. Navigate to the customized (.bmp) image, open it and click on Replace button.
  8. Repeat steps 4 to 7 above for the options 6805 and 6809 as well.
  9. Customize Win 7 Start Menu Button
  10. Now click on Save option (File->Save). Resource Hacker will automatically create a backup file called explorer_original.exe so that you can restore it in the future if needed.
  11. Log Off and Log On to see the changes in effect.
The following images shows a preview of how your start menu would look like, before and after the customization process is done.

Default Start Menu Button:

Win 7 Start Menu - Default

Customized Start Menu Button:

Customized Win 7 Start Menu
Customized Win 7 Start Menu
Customized Win 7 Start Menu
NOTE: If you are running 64-bit edition of Windows 7, then you need to use Resource Hacker version 3.5.2 beta which is 64-bit compatible. It is available from the same link provided above.

UPDATE:

The above method shows you the manual way to customize the start menu button in Windows 7. Alternatively, there is a nice tool out there using which it is possible to accomplish the same job without the need to manually edit the files and follow a long list of procedures. The tool is called Windows 7 Start Button Changer. You can download it from the following link:
I hope you enjoy this trick. Pass your comments and share your experience. Try at your own risk/

SSL

Working of Secure Sockets Layer (SSL)

Know More About Secure Sockets Layer (SSL) 
Secure Sockets Layer (SSL) is the most widely used technology for providing a secure communication between the web client and the web server. Most of us are familiar with many sites such as Gmail, Yahoo etc. using https protocol in their login pages. When we see this, we may wonder what’s the difference between http and https.
In simple words, a HTTP protocol is used for standard communication between the Web server and the client. HTTPS is used for a “Secure communication”.

How Secure Sockets Layer Works?

Before we understand the concept of SSL, let us first learn what a “Secure Communication” means. Suppose there exists two communicating parties: Say A (client) and B (server).

Working of HTTP:

When A sends a message to B, the message is sent as a plain text in an unencrypted manner. This is acceptable in normal situations where the messages exchanged are not confidential. But, imagine a situation where A sends a PASSWORD to B. In this case, the password is also sent as a plain text. This has a serious security problem because, if an intruder (hacker) can gain unauthorized access to the ongoing communication between A and B , he can easily obtain the PASSWORDS, since they remain unencrypted. This scenario is illustrated using the following diagram:
Working of HTTP

Now let us see the working of HTTPS:

When A sends a PASSWORD (say “mypass“) to B, the message is sent in an encrypted format. The encrypted message is decrypted on B‘s side. So, even if the Hacker manages to gain an unauthorised access to the ongoing communication between A and B he gets only the encrypted password (“xz54p6kd“) and not the original password. This is shown below:
Working of Secure Sockets Layer

How is HTTPS implemented?

HTTPS is implemented using Secure Sockets Layer (SSL). A website can implement HTTPS by purchasing an SSL Certificate. Secure Sockets Layer (SSL) technology protects a Web site and makes it easy for the site visitors to trust it. It has the following uses:
  1. An SSL Certificate enables encryption of sensitive information during online transactions.
  2. Each SSL Certificate contains unique and authenticated information about the certificate owner.
  3. A Certificate Authority verifies the identity of the certificate owner when it is issued.

How Encryption Works?

The whole concept of Secure Sockets Layer is implemented on the basis of RSA algorithm where each SSL Certificate consists of a Public key and a Private key. The public key is used to encrypt the information and the private key is used to decrypt it. When your browser connects to a secure domain, the server sends a Public key to the browser to perform the encryption. The public key is made available to everyone but the private key(used for decryption) is kept secret. So, during a secure communication, the browser encrypts the message using the public key and sends it to the server. This message is decrypted on the server side using the Private key(Secret key).

How to Identify a Secure Connection?

In the Internet Explorer and most other browser programs like Firefox or Google Chrome, you will see a lock icon Picture of the Lock icon in the Security Status bar. The Security Status bar is located on the right side of the Address bar. You can click the lock to view the identity of the website.
In high-security browsers, the authenticated organization name is prominently displayed and the address bar turns GREEN when an Extended Validation SSL Certificate is detected. If the information does not match or the certificate has expired, the browser displays an error message or warning and the status bar may turn RED.
So, the bottom line is, whenever you perform an online transaction such as Credit card payment, Bank login or Email login always ensure that you have a secure communication. A secure communication is a must in these situations. Otherwise there are chances of a Phishing attack using a fake login page.
I Hope you like the information presented in this article. Please pass your comments.

About Message Digest 5 Hash and its Usage

What is md5 hash and how to use it 
In this post, I will discuss about one of the interesting cryptographic algorithm called MD5 in a very simple and easy to follow manner. In addition to understanding what is MD5 hash, you will also learn how to make use of this algorithm in your daily life.

What is MD5 algorithm?

MD5 which stands for Message Digest algorithm 5 is a widely used cryptographic hash function that was invented by Ronald Rivest in 1991. The idea behind this algorithm is to take up a random data (text or binary) as an input and generate a fixed size “hash value” as the output. The input data can be of any size or length, but the output “hash value” size is always fixed. Here is an example of MD5 Hash function at work:
MD5-Hash Function Example
As you can see from the above example, whatever the input size you give, the algorithm generates a fixed size (32 digit hex) MD5 hash. You can even try this on your own using the MD5 hash generator tool here.

Applications of MD5 Hash:

Before I tell you about how to use MD5, I would like to share one of my recent experience which made me start using MD5 algorithm.
Recently I made some significant changes and updates to my website and as obvious, I generated a complete backup of the site on my server. I downloaded this backup onto my PC and deleted the original one on the server. But after a few days something went wrong and I wanted to restore the backup that I downloaded. When I tried to restore the backup, I was shocked! The backup file that I used to restore was corrupted.
That means, the backup file that I downloaded onto my PC wasn’t exactly the one that was on my server. The reason is that there occurred some data loss during the download process. Yes, this data loss can happen often when a file is downloaded from the Internet. The file can be corrupted due to any of the following reasons:
  • Data loss during the download process, due to instability in the Internet connection/server.
  • The file can be tampered due to virus infections or
  • Due to Hacker attacks.
So, whenever you download any valuable data from the Internet, it is completely necessary that you check the integrity of the downloaded file. That is, you need to ensure that the downloaded file is exactly the same as that of the original one. In this scenario, the MD5 hash can become handy. All you have to do is generate MD5 hash (or MD5 check-sum) for the intended file on your server.
After you download the file onto your PC, again generate MD5 hash for the downloaded file. Compare these two hashes and if they match, that means the file is downloaded perfectly without any data loss.
A MD5 hash is nothing but a 32 digit hexadecimal number which can be something as follows:
A Sample MD5 Hash
e4d909c290d0fb1ca068ffaddf22cbd0
This hash is unique for every file irrespective of its size and type. For example, two different executable files (.exe files) with the same size will not have the same MD5 hash even though they are of same type and size. So MD5 hash can be used to uniquely identify a file. The same thing applies even for messages where each message that was sent and received can be verified using the MD5 hash.

How to use MD5 Hash to check the Integrity of Files?

Suppose you have a file called backup.tar on your server. Before you download, you need to generate MD5 hash for this file on your server. To do so use the following command:
For UNIX:
md5sum backup.tar
When you hit ENTER you’ll see something as follows:
e4d909c290d0fb1ca068ffaddf22cbd0
This is the MD5 hash for the file backup.tar. After you download this file onto your PC, you can cross check its integrity by again re-generating MD5 hash for the downloaded file. If both the hash matches then it means that the file is perfect. Otherwise it means that the file is corrupt. To generate the MD5 hash for the downloaded file on your Windows PC use the following freeware tool:
I hope you like this post. For further doubts and clarifications, please pass your comments. Cheers!

Working of Windows Product Activation

How Windows Product Activation Works 
Windows Product Activation or WPA is a license validation procedure introduced by Microsoft Corporation in all versions of its Windows operating system. WPA was first introduced in Windows XP and continues to exist in Windows Server 2003, Windows Vista, Windows Server 2008 and Windows 7 as well.
WPA enforces each end user to activate his/her copy of Windows so as to prevent unauthorized usage beyond the specific period of time until it is verified as genuine by Microsoft. How WPA really works was a closely guarded secret until GmbH analyzed WPA using a copy of Windows XP RC1 and published a paper on their findings.
In this post you will find answers to some of the most frequently asked questions about Windows Product Activation.

Why activation?

Microsoft’s intention behind the activation is to limit the usage of its Windows operating system to only one machine for which the retail license is issued. Any other computer which runs on the same license must be disallowed from using the software. Hence, WPA demands for activation of the product within 30 days of its installation so as to ensure that it is genuine.

What does “Genuine Windows” means?

The copy of Windows is said to be genuine only if the product key used during the installation is genuine. It means that a given product key (retail license) must be used to install Windows only on one computer for which the license was purchased. Thus, if the same key is used for the installation on another computer, then it is said to be a pirated copy.

Exactly what information is transmitted during the activation?

When you activate your copy of Windows, you are transmitting an Installation ID code to Microsoft either by phone or Internet depending on the method you choose to activate. Based on this, the Microsoft’s licensing system can determine whether or not the installed OS is genuine. If it is said to be genuine, then the system will receive the Activation ID which completes the activation process. If the activation is done through a telephone, the Activation ID needs to be entered manually to complete the activation process.

What information does the Installation ID contain?

This Installation ID is a 50-digit number which is derived from the following two data.
1. Product ID – It is actually derived from the 25-digit product key (the alphanumeric value that is printed on the sticker over the Windows CD/DVD case) that is entered during the installation of the operating system. The Product ID is used to uniquely identify your copy of Windows.
2. Hardware ID – This value is derived based on the hardware configuration of your computer.
The WPA system checks the following 10 categories of the computer hardware to derive the Hardware ID:
  • Display Adapter
  • SCSI Adapter
  • IDE Adapter (effectively the motherboard)
  • Network Adapter (NIC) and its MAC Address
  • RAM Amount Range (i.e., 0-64mb, 64-128mb, etc.)
  • Processor Type
  • Processor Serial Number
  • Hard Drive Device
  • Hard Drive Volume Serial Number (VSN)
  • CD-ROM / CD-RW / DVD-ROM
Thus, the Installation ID which is a combination of Product ID and Hardware ID is finally derived and sent to Microsoft during the activation process.

How is the Installation ID validated?

The Installation ID needs to be validated to confirm the authenticity of the installed copy of Windows. So, after the Installation ID is received by Microsoft, it is decoded back so as to obtain the actual product key and the hardware details of the computer involved in the activation process.
The Microsoft’s system will now look to see if this is the first time the product key is being used for the activation. This happens when the user is trying to activate his Windows for the first time after purchase. If so, the Installation ID is instantly validated and the corresponding Activation ID is issued which completes the activation process.
However, Microsoft system will now associate this product key with the hardware ID of the computer and stores this information on their servers. In simple words, during the first use of the product key, it is paired together with the Hardware ID and this information is stored up on the Microsoft servers.

What if a computer running a counterfeit copy of Windows attempts to activate?

The activation fails whenever the copy of Windows installed is not said to be genuine. This usually happens when the product key used for the installation is said to have been used earlier on a different computer. This is determined during the activation process as follows:
During the validation of the Installation ID, the Microsoft’s system checks to see if the same product key was used in any of the previous activation processes. If so, then it looks to see the Hardware ID associated with it. The computer running a counterfeit copy of Windows will obviously have a different hardware configuration and hence the Hardware ID will mismatch. In this case the activation process will fail.
Therefore, for a successful activation, either of the following two cases must be satisfied:
  1. The product key must have been used for the first time. ie: The product key should not have been used for earlier activations on any other computer.
  2. If the product key is said to have been used earlier, then the Hardware ID should match. This happens only if the same computer for which the license was genuinely purchased is attempting for subsequent activation.

What about formatting the hard disk?

Each time the hard disk is reformatted and the Windows is re-installed, it needs to be re-activated. However, the activation process will be completed smoothly since the same computer is attempting for subsequent activation. In this case, both the product key and the Hardware ID will match and hence the activation becomes successful.

What if I upgrade or make changes to my hardware?

In the above mentioned 10 categories of hardware, at least 7 should be the same. Thus you are allowed to make changes to not more than 3 categories of hardware. If you make too many changes then your activation will fail. In this case, it is necessary to contact the customer service representative via phone and explain about your problem. If he is convinced he may re-issue a new product key for your computer using which you can re-activate your Windows.

Some things WPA does not do:

  • WPA does not send any personal information at all about you to Microsoft. There is still an option to register the product with Microsoft, but that is separate and entirely voluntary.
  • If you prefer to activate via phone, you are not required to give any personal information to Microsoft.
  • WPA does not provide a means for Microsoft to turn off your machine or damage your data/hardware. (Nor do they even have access to your data). This is a common myth that many people have about Microsoft products.
  • WPA is not a “lease” system requiring more payments after two years or any other period. You may use the product as licensed in perpetuity.
I have tried my best to uncover the secret behind the WPA. For further details and more technical information you can read the actual paper by Fully Licensed GmbH at http://www.licenturion.com/xp/fully-licensed-wpa.txt. I hope you like this post. Pass your comments.