keylogger without INT

Programming, for all ages and all languages.
Post Reply
Hercules
Posts: 15
Joined: Sun Dec 01, 2013 6:08 am

keylogger without INT

Post by Hercules »

Hi! I'm writing a keylogger for all OSes(include windows) my code works fine when press a key the key is logged but the keyboard seems locked. Why it happens? I think that the problem is at the value at input status byte. This is part of my code:

Code: Select all

Begin:
in al,64h
test al,1
jz Begin
test al,20h
jnz Begin
in al,60h
...
What is wrong at the code above? Why the keyboard lock with this code?
User avatar
iansjack
Member
Member
Posts: 4685
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: keylogger without INT

Post by iansjack »

You don't appear to be sending the end-of-interrupt command.
Hercules
Posts: 15
Joined: Sun Dec 01, 2013 6:08 am

Re: keylogger without INT

Post by Hercules »

No! This is NOT a interrupt. This is the code to get a key without interruopts.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: keylogger without INT

Post by Combuster »

Hercules wrote:include[sic] windows
You're stealing the scancode from the driver. Driver sad. Driver dies from starvation. RIP windows.

But seriously, start with explaining why you're even doing this.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: keylogger without INT

Post by bluemoon »

And anyone still using PS/2 keyboard or have an ancient OS that uses PS/2 emulation mode?
User avatar
iansjack
Member
Member
Posts: 4685
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: keylogger without INT

Post by iansjack »

Hercules wrote:No! This is NOT a interrupt. This is the code to get a key without interruopts.
You're joking, aren't you?
Hercules
Posts: 15
Joined: Sun Dec 01, 2013 6:08 am

Re: keylogger without INT

Post by Hercules »

iansjack wrote:You're joking, aren't you?
No! I'm NOT joking and do NOT provoke me because I am going to have a hysterical attack.
The question is that this code don't works because the value at port 64h that I think is 21h is NOT 21h then what is the value of input status byte(64h) for I can read scancode of port 60h?
User avatar
Minoto
Member
Member
Posts: 89
Joined: Thu May 12, 2011 7:24 pm

Re: keylogger without INT

Post by Minoto »

Hercules wrote:The question is that this code don't works because the value at port 64h that I think is 21h is NOT 21h then what is the value of input status byte(64h) for I can read scancode of port 60h?
Have you tried searching the Wiki? The article about the 8042 PS/2 controller might have the information you need.
Those who understand Unix are doomed to copy it, poorly.
User avatar
iansjack
Member
Member
Posts: 4685
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: keylogger without INT

Post by iansjack »

Hercules wrote:
iansjack wrote:You're joking, aren't you?
No! I'm NOT joking.
That's sad.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: keylogger without INT

Post by Combuster »

do NOT provoke me because I am going to have a hysterical attack.
Have we met before? Or was it some relative? :roll:

If you can't control yourself, that's your problem. Your actions are your responsibility.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
nerdguy
Member
Member
Posts: 70
Joined: Wed Oct 30, 2013 8:11 am

Re: keylogger without INT

Post by nerdguy »

do NOT provoke me because I am going to have a hysterical attack.
I guess someone once said that you need to be emotionally strong before doing something that requires intellectual strength like programming.
......without INT
Troll? Why are you doing this? It isn't a good challenge I guess.
When you say, "I wrote a program that crashed Windows," people just stare at you blankly and say, "Hey, I got those with the system, for free." - Linus Torvalds
64 bit Kernel in early development
http://github.com/nerdguy12/core64
Hercules
Posts: 15
Joined: Sun Dec 01, 2013 6:08 am

Re: keylogger without INT

Post by Hercules »

Look this code:

Code: Select all

Begin:
in al,64h
test al,1
jz Begin
test al,20h
jnz Begin
Why my keylogger with this part of code lock the keys when I release a key? This code only works whe I press and do NOT release a key. Why?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: keylogger without INT

Post by Combuster »

I hear echoes.

Should I post echoes?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
iansjack
Member
Member
Posts: 4685
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: keylogger without INT

Post by iansjack »

Hercules wrote:Look this code:

Code: Select all

Begin:
in al,64h
test al,1
jz Begin
test al,20h
jnz Begin
Why my keylogger with this part of code lock the keys when I release a key? This code only works whe I press and do NOT release a key. Why?
You've already been told the answer to this question. Do you believe that if you ask it enough times the truth will magically change?
Insanity: doing the same thing over and over again and expecting different results.

Albert Einstein
Post Reply