![]() |
|
[.NET] Auto-Fill Web Browser Log In. Username does not exist when auto-filled - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] Auto-Fill Web Browser Log In. Username does not exist when auto-filled (/showthread.php?tid=5695260) Pages: Pages
1
2
|
Auto-Fill Web Browser Log In. Username does not exist when auto-filled - Moon Rock - Aug 15, 2017 So I'm trying to create a web browser auto-login with a button. I have tried setting innertext, and attributes to my Username and Password;however, when I click Log In the website gives me an error saying that the user does not exist. If I C+P the username from the code it works just fine, not sure what to do about this. I have tried different methods of inserting the username and same shit. Any help is appreciated. Code Dim Username As HtmlElement* - Ninja - Aug 15, 2017 (Aug 15, 2017 11:12 AM)Moon Rock Wrote: So I'm trying to create a web browser auto-login with a button. I have tried setting innertext, and attributes to my Username and Password;however, when I click Log In the website gives me an error saying that the user does not exist. If I C+P the username from the code it works just fine, not sure what to do about this. I have tried different methods of inserting the username and same shit. Any help is appreciated. Have you checked if the values are actually getting set? Just put the WebBrowser visible in the designer somewhere. * - idb. - Aug 15, 2017 There are certain forms out there on the internet that will not accept a value set through SetAttribute and actually require a KeyPress event to fire in order for the value to go "into play". I'm not saying this is happening for you as I have no idea what site you're working on, just making you aware that could be a cause of your issue, though I doubt it. Good luck! * - Moon Rock - Aug 15, 2017 (Aug 15, 2017 05:05 PM)idb. Wrote: There are certain forms out there on the internet that will not accept a value set through SetAttribute and actually require a KeyPress event to fire in order for the value to go "into play". I'm not saying this is happening for you as I have no idea what site you're working on, just making you aware that could be a cause of your issue, though I doubt it. Good luck! I guess I will do the keypress events. I was thinking about it also using tab to initiate it. (Aug 15, 2017 02:44 PM)Ninja Wrote: Have you checked if the values are actually getting set? Just put the WebBrowser visible in the designer somewhere. The values are being set, I can see it through the WebBrowser. When I C+P from the WebBrowser it comes out just fine in notepad. * - Ninja - Aug 15, 2017 (Aug 15, 2017 05:11 PM)Moon Rock Wrote: I guess I will do the keypress events. I was thinking about it also using tab to initiate it. So the textboxes in the form on the website are getting set? Then there is no use for keypress events. * - Moon Rock - Aug 15, 2017 (Aug 15, 2017 05:40 PM)Ninja Wrote: So the textboxes in the form on the website are getting set? Then there is no use for keypress events. The textboxes are being set on the website. However once I click Login it claims the user does not exist. I just changed my code to KeySend for the textboxes and it works perfectly fine. I don't really like doing it this way, but I guess it'll work for now. * - Ninja - Aug 15, 2017 (Aug 15, 2017 05:44 PM)Moon Rock Wrote: The textboxes are being set on the website. However once I click Login it claims the user does not exist. Maybe it for some reason set the placeholder for the textbox and not the actual value? Weird... anyways, good job on solving it! * - iphone5s - Aug 16, 2017 (Aug 15, 2017 05:44 PM)Moon Rock Wrote: The textboxes are being set on the website. However once I click Login it claims the user does not exist. Their can be possibility of focusout event firing on that textfield to check username? * - idb. - Aug 16, 2017 (Aug 15, 2017 05:40 PM)Ninja Wrote: So the textboxes in the form on the website are getting set? Then there is no use for keypress events. Inaccurate information. (Aug 15, 2017 05:44 PM)Moon Rock Wrote: The textboxes are being set on the website. However once I click Login it claims the user does not exist. Hoping you're not using SendKeys. You can use actual windows API to fill forms in a webbrowser, you just need to target the handle of the embedded browser object. You may want to look into pasting into the field too (you can use ExecCommand for this). Good luck! * - DeadKube - Aug 16, 2017 (Aug 16, 2017 03:59 AM)idb. Wrote: Inaccurate information. Oh thank God at least someone gets it! You could also look into webbrowser extension development since it would be an excellent project for such a thing. That is if you're making a lastpass alternative. Why anyone would use a webbrowser control for anything besides making your own 'webbrowser' for learning purposes is beyond me. It uses Internet Explorer for gods sake. Why is that bad, you may ask? To start with IE is incredibly dated, it will not support certain JS functions and will thus result in compatibility issues. Any webdev knows this and any webdev will recommend you to NOT use IE at all. Second, if you're not showing the webbrower control to the user then what exactly is the point even? This control was developed to allow your user to visit a help page for example, or to learn you some basics. You can make your own webbrowser using built in .net classes or go beyond that. Go deeper. Anyway, please just use the Gecko or webkit. Do yourself a favor. To log-in all you actually have to do is 'follow the money' so to speak. Look where the information is posted to, and use that service/api. I know all about hidden fields that try and stop this but you can still circumvent this. Lol. Even captcha's can be mitigated using certain tactics by for example showing the user the captcha and making the user fill it in.. Remember that tokens can be generated by you.. * - Ninja - Aug 16, 2017 (Aug 16, 2017 08:13 PM)DeadKube Wrote: Why anyone would use a webbrowser control for anything besides making your own 'webbrowser' for learning purposes is beyond me. Because for people beginning in web-botting it is easier. * - DeadKube - Aug 16, 2017 (Aug 16, 2017 09:53 PM)Ninja Wrote: Because for people beginning in web-botting it is easier. In life It's easier to kill myself, doesn't mean I'd do it. Same rule applies. You either use good practices or you will fail, horribly. * - Ninja - Aug 16, 2017 (Aug 16, 2017 09:54 PM)DeadKube Wrote: In life It's easier to kill myself the worst analogy I have ever seen * - DeadKube - Aug 16, 2017 (Aug 16, 2017 09:56 PM)Ninja Wrote: the worst analogy I have ever seen Life is hard! Some people say living life is like spending time in hell. Existance being sorrow. Analogy explained. Now back on topic. * - Moon Rock - Aug 17, 2017 (Aug 16, 2017 08:13 PM)DeadKube Wrote: Oh thank God at least someone gets it! I am seeing the web browser. I also do know the many draw backs of IE, I actually had to update it to Version 11 for this project. I'm new to doing anything with editing/changing html values and elements so it's best for me to visually see what happening and work from a easier point of view. I have tried to use api's; however, I never understood how to use them. |