comp.lang.ada
 help / color / mirror / Atom feed
* what do i need to make a keylogger?
@ 2014-07-14  3:29 torralbaduran
  2014-07-14  4:07 ` Shark8
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: torralbaduran @ 2014-07-14  3:29 UTC (permalink / raw)


as far as i know, i would need low level ada programming, but I don't want to do it in C (there are lots of tutorials and sample code already in C).
This keylogger will run in the background of my windows 7  machine.
Does anyone have a sample code that will work on windows 7? or can anyone point me to a good reference in windows and ada hardware?

Thank you :)


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: what do i need to make a keylogger?
  2014-07-14  3:29 what do i need to make a keylogger? torralbaduran
@ 2014-07-14  4:07 ` Shark8
  2014-07-14  4:44 ` jsquirek
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Shark8 @ 2014-07-14  4:07 UTC (permalink / raw)


On 13-Jul-14 21:29, torralbaduran@gmail.com wrote:
> as far as i know, i would need low level ada programming, but I don't want to do it in C (there are lots of tutorials and sample code already in C).
> This keylogger will run in the background of my windows 7  machine.
> Does anyone have a sample code that will work on windows 7? or can anyone point me to a good reference in windows and ada hardware?
>
> Thank you :)
>

I don't have any sample code, but I think you can just set up the 
keylogger as an interrupt service* (be sure to chain in the old 
interrupt)... I can't think of any reason that wouldn't work on any x86 OS.

Use aspect Interrupt_Handler & Attach_Handler
( See: http://www.ada-auth.org/standards/2xrm/html/RM-C-3-1.html )

Examples of handling interrupts:
http://wiki.ada-dk.org/catching_and_handling_interrupts_in_ada
http://stackoverflow.com/questions/10640108/ada-interrupt-handlers
http://www.adacore.com/adaanswers/gems/ada-gem-13/

------------------------------
* IRQ 1 — keyboard controller.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: what do i need to make a keylogger?
  2014-07-14  3:29 what do i need to make a keylogger? torralbaduran
  2014-07-14  4:07 ` Shark8
@ 2014-07-14  4:44 ` jsquirek
  2014-07-15  1:30 ` torralbaduran
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: jsquirek @ 2014-07-14  4:44 UTC (permalink / raw)


On Sunday, July 13, 2014 11:29:24 PM UTC-4, torral...@gmail.com wrote:
> as far as i know, i would need low level ada programming, but I don't want to do it in C (there are lots of tutorials and sample code already in C).
> 
> This keylogger will run in the background of my windows 7  machine.
> 
> Does anyone have a sample code that will work on windows 7? or can anyone point me to a good reference in windows and ada hardware?
> 
> 
> 
> Thank you :)

Yes. I have a rough idea of what you would need to use for the best result. Unfortunately, I am still in the process of working on it myself with my Ada Doom 3 project. Please take a look at the links below and I will be glad to answer any questions. In short: the best option is to use window's raw input api and then writing a function that can translate virtual keycodes to the correctly translated character. A simple keyboard hook may do the trick as well and would be much easier to implement.

API overview:
https://plus.google.com/102090077582777383295/posts/StaiiW72Czw

Relevant code from project:
https://github.com/AdaDoom3/AdaDoom3/blob/master/Engine/Systems/Windows/neo-system-input-import.adb
https://github.com/AdaDoom3/AdaDoom3/blob/master/Engine/Systems/Windows/neo-link-windows.ads
https://github.com/AdaDoom3/AdaDoom3/blob/master/Engine/Systems/Windows/neo-link.ads


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: what do i need to make a keylogger?
  2014-07-14  3:29 what do i need to make a keylogger? torralbaduran
  2014-07-14  4:07 ` Shark8
  2014-07-14  4:44 ` jsquirek
@ 2014-07-15  1:30 ` torralbaduran
  2014-07-15  2:36   ` jsquirek
  2014-07-16  3:39 ` torralbaduran
  2014-07-18 23:02 ` torralbaduran
  4 siblings, 1 reply; 8+ messages in thread
From: torralbaduran @ 2014-07-15  1:30 UTC (permalink / raw)


All right, this seems like a job for a man. But oh man... thank you for the references. I would have to use windows message queue with Windows(R) Ada bindings. Lets see what I come up with. 

Thank you

Angel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: what do i need to make a keylogger?
  2014-07-15  1:30 ` torralbaduran
@ 2014-07-15  2:36   ` jsquirek
  0 siblings, 0 replies; 8+ messages in thread
From: jsquirek @ 2014-07-15  2:36 UTC (permalink / raw)


On Monday, July 14, 2014 9:30:20 PM UTC-4, torral...@gmail.com wrote:
> All right, this seems like a job for a man. But oh man... thank you for the references. I would have to use windows message queue with Windows(R) Ada bindings. Lets see what I come up with. 
> 
> 
> 
> Thank you
> 
> 
> 
> Angel

Ah, I hope I didn't discourage you! I think putting into a series of steps would be the best way to think about it.

-- Find the exact WinAPI solution you want to implement and a complete example of it (it will probably be in C++)
-- Create your own Ada based API for what you would like to work with (you can even get this compiling with empty subprograms)
-- Import only the functions you needed to complete your functionality. I imagine the final binding you would make to meet this input functionality would only be at most 150 or 200 lines and be much easier to understand than the whole of the official Windows bindings sponsored by Ada Core.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: what do i need to make a keylogger?
  2014-07-14  3:29 what do i need to make a keylogger? torralbaduran
                   ` (2 preceding siblings ...)
  2014-07-15  1:30 ` torralbaduran
@ 2014-07-16  3:39 ` torralbaduran
  2014-07-18 23:02 ` torralbaduran
  4 siblings, 0 replies; 8+ messages in thread
From: torralbaduran @ 2014-07-16  3:39 UTC (permalink / raw)


No discourage at all,, but first, I will look at the source code of some famous keyloggers to see what I can grasp... BTW cool project for Ada Doom, my hat is off to you. We'll what I come up with in these days

Best regards,

angel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: what do i need to make a keylogger?
  2014-07-14  3:29 what do i need to make a keylogger? torralbaduran
                   ` (3 preceding siblings ...)
  2014-07-16  3:39 ` torralbaduran
@ 2014-07-18 23:02 ` torralbaduran
  2014-07-30 14:20   ` jsquirek
  4 siblings, 1 reply; 8+ messages in thread
From: torralbaduran @ 2014-07-18 23:02 UTC (permalink / raw)


Whats up!!!
I finally got a hold of user32.dll inside windows... I can now open dialog boxes.... What does this mean? user32.dll can detect keystrokes from the keyboard.... 

Let me keep working on it until I get a full working keylogger.
I'll keep you updated in thread... hopefully by the next month I will have a working keylogger in ada


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: what do i need to make a keylogger?
  2014-07-18 23:02 ` torralbaduran
@ 2014-07-30 14:20   ` jsquirek
  0 siblings, 0 replies; 8+ messages in thread
From: jsquirek @ 2014-07-30 14:20 UTC (permalink / raw)


I finished my keylogger for windows although it is currently without dead chars and it does not work yet for 32 bit applications running on x64. This means you'll have to get a 64 bit gnat compiler to compile it if you are using an x64 install, but you can run the executable Neo/Doom3/game64.exe to test it. Hope this helps.

Code:
https://github.com/AdaDoom3/AdaDoom3/blob/input/Engine/neo-system-input.ads
https://github.com/AdaDoom3/AdaDoom3/blob/input/Engine/neo-system-input.adb
https://github.com/AdaDoom3/AdaDoom3/blob/input/Engine/Systems/Windows/neo-system-input-import.adb
https://github.com/AdaDoom3/AdaDoom3/archive/input.zip

Compiler:
http://sourceforge.net/projects/ya-mingw64/files/win64/gcc-4.6/gcc_4.6.0_mingw64_x86_64_K8%2Bada.7z/download

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-07-30 14:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-14  3:29 what do i need to make a keylogger? torralbaduran
2014-07-14  4:07 ` Shark8
2014-07-14  4:44 ` jsquirek
2014-07-15  1:30 ` torralbaduran
2014-07-15  2:36   ` jsquirek
2014-07-16  3:39 ` torralbaduran
2014-07-18 23:02 ` torralbaduran
2014-07-30 14:20   ` jsquirek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox