I am developing an auto-login plugin, which will record all the mouse-click location(point) and also fetch the text content of any text control firstly, then this record/text content can be used to realize auto login(auto mouse click and input password); In third-part winform App, I can get my plugin work through the functions of 'user32.dll' and 'gdi32.dll'; But in third-part WPF App, the winform method is insufficient, I am trying with 'System.Windows.Automation'; I can get automationID, location...etc with 'AutomationElement', but I can not find a way to fetch the protected content(password), only can get masked symbol, like '*****'. I try the method from [here]:C# System.Windows.Automation get element text; but it doesn't work for protected content(Password). Does someone can help? Thanks in advance.
Asked
Active
Viewed 106 times
2
-
to be honest, the whole point of a PasswordBox is to prevent something like this - it even stores the password text in secure string and withing app you need to use `TextChanged` event to get the password – Krzysztof Skowronek Jan 03 '19 at 08:11
-
I need to get password text of third-part app(WPF), my code is outside the third-part app, how can I use TextChanged event? – AlenZ Jan 07 '19 at 03:36
-
my point was, that the whole reason for using PasswordBox over TextBox in WPF app is exactly to prevent what you are trying to do – Krzysztof Skowronek Jan 07 '19 at 09:24