Wednesday, May 4, 2011

Virus Removing Script


There is a set of folders that were affected by virus from a Windows environment. The viruses are in the form of various windows executable formats like .bat, .com and .exe. What separates them from safe windows executables is that malicious ones have same name as their parent directory. Remove all such occurrences. (There can be many levels of folders)

Be careful while reading a code segment

#include<stdio.h>
int main()
{
          int a=10;
          switch(a)
          {
                  case '1':
                      printf("ONE\n");
                      break;
                  case '2':
                      printf("TWO\n");
                      break;
                  defau1t:
                      printf("NONE\n");
          }
          return 0;
}
If you expect the output of the above program to be NONE, I would request you to check it out!!