0

I've been looking around SendKeys to input credentials into a web page. I've noticed there are two ways to really do this, and neither are garunteed. The nature of SendKeys is that there has to be focus. .NET can't interact with non-.NET windows and stuff. I understand and it makes sense.

So either:

1) Sendkeys and hope that the window is focused

or:

2) Obtain the page's POST method for login and manipulate the URL Like: http://blahblah.com/login.aspx?user=NAME&pass=PASS

Currently the first method is having too much of an issue with "what if the user has a task bar" or "what if the computer loads too slowly". Nothing can really be done here as far as I know

But what about number 2? Lets say the web page is flash. Is there any possible way I can get the POST method for username and pass? For example this website is the one I'm trying to slipstream user info into. I can't find any kind of POST method because the thing is in flash. Even after looking in web tools like chrome's inspector.

Is there truly no other workaround?

Community
  • 1
  • 1
user99999991
  • 1,351
  • 3
  • 19
  • 43
  • You have to entangle yourself with Windows APIs, especially [SendMessage](http://msdn.microsoft.com/en-us/library/windows/desktop/ms644950(v=vs.85).aspx) (WM_KEYDOWN, WM_KEYUP messages). Some suggest using [SendInput](http://msdn.microsoft.com/en-us/library/windows/desktop/ms646310%28v=vs.85%29.aspx), but I had no luck with background windows. However, my heads up is that it doesn't *always* work, as in "not every application seems to care about messages sent this way". It's a mystery of WinApi, I guess. All you can do is try. – KappaG3 Jul 31 '13 at 16:47
  • 1
    You can use any "web insspector" (aka developer tools/console) in any modern browser to see what Flash is sending/receiving. Flash uses the web browser to make HTTP calls, so they will show up there just like any other HTTP call. The packet sniffing tools would also show this. – Sunil D. Jul 31 '13 at 16:47
  • I had already tried to inspect the flash page, but I can't actually see anything inside the Flash. I also don't know if anything the flash is doing is actually a POST call or something programmed into the flash to communicate. Unless I'm doing something wrong, which is what I'm trying to figure out. – user99999991 Jul 31 '13 at 16:59

0 Answers0