Hi @ all

Does someone of you know how to read the content of a foreign edit-control? Foreign means, that this control doesn't belong to my program. If the mouse moves over an edit-control the program should read it out. That's all. Getting the handle of this control was no problem. But I can't read the text with WM_GETTEXT message. The editmessage doesn't work too.

I hope you could help me

:( Marwin
Posted on 2002-10-29 04:49:54 by Marwin
Did you try SendMessage, hwnd, WM_GETTEXT,,?

PostMessage, GetWindowText, etc will not work, but SendMessage should work.
Posted on 2002-10-29 05:11:21 by Four-F
PostMessage, GetWindowText, etc will not work, but SendMessage should work.
Unless the edit box has custom handling (ie not default) for the WM_GETTEXT message, in which case you are out of luck.

Marwin, this wouldn't happen to be a password field would it? :eek: :grin:
Posted on 2002-10-29 05:20:19 by sluggy
Oh, yes. Why not? Such little tool is quite helpfull, or not?

:) Marwin
Posted on 2002-10-29 05:45:52 by Marwin
This method doesn't work under 2k and xp...
For NT systems, you can consider using remote thread instead.
Posted on 2002-10-29 06:15:40 by C.Z.
check WinSpy++ 45k zip

WinSpy++ can obtain the following window properties:

    [*]Window Class and Name.
    [*]Window procedure address.
    [*]All window styles and extended styles.
    [*]Window properties (set using the SetProp API call).
    [*]Complete Child and Sibling window relationships.
    [*]Scrollbar positional information.
    [*]Full window Class information.

    New in version 1.5!

      [*]Retrieve passwords from password-edit controls!
      [*]Edit window styles!
      [*]Alter window captions!
      [*]Show / Hide / Enable / Disable / Adjust any window in the system!
      [*]Massively improved user-interface!
      [*]View the complete system window hierarchy!

      source available in C too ...

      posted on this messageboard couple of times (found 4 times :grin: )
Posted on 2002-10-29 08:23:24 by TBD
Oh, yes. Why not? Such little tool is quite helpfull, or not?

Password Revealer

This method doesn't work under 2k and xp...

If you mean SendMessage,,WM_GETTEXT,,? it works!
At least under w2k. I did it many times.

Marwin, if you still unsuccessful with SendMessage and PassvordReveler did not help,
you have to hook your edit control. I've attached some ex.
Can't remember if i tested it under nt, but anyway it should work.
Run Target.exe, then RTH.exe, and play with Get/Set/Spy buttons.
Hope this helps.
Posted on 2002-10-29 09:05:09 by Four-F
Four-F: remotetexthunter works on NT4SP6 :alright: - nice!
Posted on 2002-10-29 09:07:59 by TBD
Ok, sorry guys. Sending a WM_GETTEXT message works very well. But not if you're sending it to the wrong window. The hook procedure returns the handle in wParam, and I sent the message to lParam. :stupid: Now it works great (under Win98SE).

:):) Marwin
Posted on 2002-10-29 13:51:00 by Marwin
Maybe you can look at a program source of one of our members, Vom-Bonjour... it does exactly what you want.
The source are released both on the MASM32 package as an example, and in Iczelion's website (Get&Set)...
Posted on 2002-10-29 14:12:18 by JCP
Four-F, I meant editboxes with the ES_PASSWORD bit set. :)
Password Revealer works fine and I'd say you did it the best way; approaches other than hooking would fail in one Windows version or another.
Posted on 2002-10-30 02:59:29 by C.Z.
In case any of you managed to spot what bomb01 wrote about it not being possible to read password fields in 2K and XP, you *can* read it by sending it a WM_GETTEXT, but it is already encrypted so it will mean nothing to you.
Posted on 2002-10-30 04:23:27 by sluggy