Article View: borland.public.cppbuilder.nativeapi
Article #2992Re: Get text from a (external program's) Edit Control under Mouse Cursor
From: Alan Bellingham
Date: Tue, 05 Sep 2006 16:14
Date: Tue, 05 Sep 2006 16:14
33 lines
2198 bytes
2198 bytes
"JasperP" <Spam@SpamCop.net> wrote: >I'm trying to create a small tool whereby users can retrieve their >passwords. >So read a masked password from eg. Outlook. > >How can I manage this? I rather hope you can't - because if you can, it means that there really is no security in Windows. (And I'm naive enough to hope that there's enough to defeat this, at least.) In principle, you should be able to use GetWindowText() using the window handle. This can, in principle, be used to go cross-process. On the other hand, it's down to control receiving the WM_GETTEXT message to disable the functionality, and I would rather hope that a password entry field does so. If it didn't, then it's too easy for a virus on your machine to grab all your passwords and email them to Lithuania, or Miami, or wherever. An alternate solution - and no, I've not even thought about trying this - would be to watch for new windows appearing with the ES_PASSWORD attribute. When one does, you could pop up your window instead for the user to type into, and then send the result off to the original. (I assume that WM_SETTEXT would still work.) Alan Bellingham -- ACCU Conference: 11-14 April 2007 - Paramount Oxford Hotel
Technical Details
Message-ID:
<8v7rf25uai1ldlmu12psopd6oscoa4rtdv@4ax.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<44fd99f3$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,32b21842bccb2a83 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Alan Bellingham <alan@lspace.org> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Get text from a (external program's) Edit Control under Mouse Cursor Date: Tue, 05 Sep 2006 17:14:30 +0100 Organization: Private Reply-To: alan@lspace.org Message-ID: <8v7rf25uai1ldlmu12psopd6oscoa4rtdv@4ax.com> References: <44fd99f3$1@newsgroups.borland.com> X-Newsreader: Forte Agent 4.0/32.1071 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 193.129.251.253 X-Trace: newsgroups.borland.com 1157472869 193.129.251.253 (5 Sep 2006 09:14:29 -0700) Lines: 33 Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail