Hack Forums
[.NET] Question webbrowser and javascript vb.net ? - 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] Question webbrowser and javascript vb.net ? (/showthread.php?tid=6015145)



Question webbrowser and javascript vb.net ? - D3ath_GuN - Oct 9, 2019

Hello,

I would like to know how to make javascript scripts work with the webbrowser.
Because, I made a small program under vb.net to infect via a web page that mine "jsecoin" + "Pop up"

I would like to know how I make it work?

I used this code to block JavaScript error messages.
Code
WebBrowser1.ScriptErrorsSuppressed() = True



RE: Question webbrowser and javascript vb.net ? - tuttifrutti14 - Oct 14, 2019

May I ask a few questions?
What do you mean by "to make javascript scripts work with the webbrowser" ?
As far as I know, the Webbrowser control is actually IE. And if your IE supports/ JS enabled then you should be fine.
And for the code :
Code
WebBrowser1.ScriptErrorsSuppressed() = True
Try inserting that line on the program's load event.


RE: Question webbrowser and javascript vb.net ? - MavenGradle - Oct 14, 2019

Are you asking how to inject JavaScript in websites using the default browser of a user or how to use JavaScript in the Webbrowser control? I can't quite tell from your post. Either way, the default Webbrowser control duplicated the Internet Explorer web browsing functionality which is not something you'd want in this day and age. The reasoning behind this is that JavaScript has evolved since Internet Explorer last released and modern versions of JS simlply won't work or display various error messages for which you'd have to transpile your JavaScript to work with older webbrowsers. Besides that, the WebBrowser control is a very resource-hungry control.

I would suggest that you look at other libraries to get up-to-date webbrowsing functionality or instead utilize the power of already existing browsers, in which case I suppose that what you're doing may be considered illegal, depending on what you'd use this for, so I'm not going to provide any more assistance than this.


RE: Question webbrowser and javascript vb.net ? - gigajew - Oct 14, 2019

IE may have some settings in a registry key for this

Edit (maybe this): https://support.microsoft.com/en-us/help/175500/error-message-a-script-on-this-page-is-causing-internet-explorer-to-ru


RE: Question webbrowser and javascript vb.net ? - Krysis - Jan 3, 2020

(Oct 9, 2019 08:57 PM)D3ath_GuN Wrote:  Hello,

I would like to know how to make javascript scripts work with the webbrowser.
Because, I made a small program under vb.net to infect via a web page that mine "jsecoin" + "Pop up"

I would like to know how I make it work?

I used this code to block JavaScripterror messages.
Code
WebBrowser1.ScriptErrorsSuppressed() = True

Not possible.

I can recommend you looking in to Selenium for .NET instead.