Hack Forums
[.NET] My WebBrowser1 is running an old version - 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] My WebBrowser1 is running an old version (/showthread.php?tid=5103974)

Pages: Pages 1 2


My WebBrowser1 is running an old version - Datageni - Dec 22, 2015

Hey there.
I just started learning VB.NET and I must say it's quite fascinating. My first project is a website spammer, and I'll use Kahoot.it as a demo website.
Anyways, when I'm trying to visit the website using WebBrowser1.Navigate, it says I'm running an outdated browser version. How can I fix this?

Screenshot:
https://i.imgur.com/PlbRiir.png

Code:
Code
Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        WebBrowser1.Navigate("https://kahoot.it/")
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        WebBrowser1.Document.GetElementById("inputSession").SetAttribute("value", TextBox1.Text)
    End Sub
End Class

Thanks in advance!


* - idb. - Dec 22, 2015

Change the User-Agent of the control.


* - Datageni - Dec 22, 2015

(Dec 22, 2015 09:22 AM)idb. Wrote:  Change the User-Agent of the control.

Sorry for being such a noob, but how can I do that?
I'm completely new with this stuff 🤨


* - Compoze - Dec 22, 2015

You're aware that the web-browser control is running Internet Explorer, right? Changing the user-agent wont change that.


* - Datageni - Dec 22, 2015

(Dec 22, 2015 02:05 PM)Compoze Wrote:  You're aware that the web-browser control is running Internet Explorer, right? Changing the user-agent wont change that.

That's what I thought too. It's running an old version of Internet Explorer. I'm guessing IE6 or something. What can I do to solve this?


* - nathan72389 - Dec 22, 2015

(Dec 22, 2015 02:15 PM)Capiche Wrote:  That's what I thought too. It's running an old version of Internet Explorer. I'm guessing IE6 or something. What can I do to solve this?

Oh man, stop with this thinking. This is just wrong information. In short the ie control is the same as you have installed. They are both using the same component. Since you are assuming that it is ie6 that only shows that you have no clue what you are talking about. If you took 1,2 mind to even Google what version the frame work is using, you would know this and also how to change the user agent. Anyway. I can see that you do not want to learn, just be spoon fed so I will tell you that you can change the headers in the standard web browser control in the navigate sub. Its an overload.


* - Zilog80 - Dec 22, 2015

(Dec 22, 2015 01:07 PM)Capiche Wrote:  Sorry for being such a noob, but how can I do that?
I'm completely new with this stuff 🤨

Code
webBrowser.Navigate("http ://www (dot) google (dot) com", Nothing, Nothing,
                    "User-Agent: Here Put The User Agent")

User agent sample:

Code
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1

A lot of user agents strings:

Code
w.w.w (dot) useragentstring (dot) com/pages/Browserlist/

ANYWAY, even you change the webbrowser user-agent, may not work. WebBrowser control is bases on Internet Explorer version 7. You should try the user agent trick.


* - nathan72389 - Dec 22, 2015

(Dec 22, 2015 02:29 PM)Zilog80 Wrote:  ANYWAY, even you change the webbrowser user-agent, may not work. WebBrowser control is bases on Internet Explorer version 8 or 9. You should try the user agent trick.



holy shit, stop with your bull shit
learn what in the fuck your talking about.


(Dec 9, 2015 06:52 AM)nathan72389 Wrote:  wrong.

lets start here:

source:
https://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser%28v=vs.110%29.aspx

then go here
[Image: ZAGcc2F.png]

then over here:
source: https://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.version%28v=vs.110%29.aspx

[Image: qpzTm9H.png]



* - Datageni - Dec 22, 2015

(Dec 22, 2015 02:35 PM)nathan72389 Wrote:  -snip-

Thanks for your reply.
I tried it out and here is what I got:
[Image: vWYHNbC.png]

I'm running IE11 on Windows 8.1, according to the results. Anyways, how does this solve my problem? I'm still not able to access kahoot.it from my WebBrowser1 in VB. I can access it through my normal IE11 browser though.


* - nathan72389 - Dec 22, 2015

(Dec 22, 2015 02:44 PM)Capiche Wrote:  Thanks for your reply.
I tried it out and here is what I got:
[Image: vWYHNbC.png]

I'm running IE11 on Windows 8.1, according to the results. Anyways, how does this solve my problem? I'm still not able to access kahoot.it from my WebBrowser1 in VB. I can access it through my normal IE11 browser though.

I am not telling you how to solve your problem. I am telling these ppl that are saying that the web browser controls is ie 6,7,8 are Wrong!


* - Datageni - Dec 22, 2015

(Dec 22, 2015 02:48 PM)nathan72389 Wrote:  I am not telling you how to solve your problem. I am telling these ppl that are saying that the web browser controls is ie 6,7,8 are Wrong!

Well, I was hoping for some kind of information atleast. I'm not asking you to do the whole thing for me and to spoon feed me, but to take me to the right direction. I have been googling for almost an hour now, and I can't seem to find the right content.


* - Zilog80 - Dec 22, 2015

(Dec 22, 2015 02:35 PM)nathan72389 Wrote:  holy shit, stop with your bull shit
learn what in the fuck your talking about.

Can you explain this:

i.imgur.com/KAGoZDB.png

Edit:
postimg.org/image/raihor08f/


Thanks.


* - The-One - Dec 22, 2015

(Dec 22, 2015 03:12 PM)Zilog80 Wrote:  Can you explain this:

i.imgur.com/KAGoZDB.png

Thanks.

[Image: removed.png]

I can explain it to you: your image got removed!

(Dec 22, 2015 02:52 PM)Capiche Wrote:  Well, I was hoping for some kind of information atleast. I'm not asking you to do the whole thing for me and to spoon feed me, but to take me to the right direction. I have been googling for almost an hour now, and I can't seem to find the right content.

The million dollar question is: do you want to distribute the application? If so, you should think about the problem you are facing now can happen to others too. There are a few solutions; if you just are using it privately: you can update your IE on your computer. If you want to distribute it I'd recommend you to use either Gecko or Awesomium (http://www.codeproject.com/Tips/825526/Csharp-WebBrowser-vs-Gecko-vs-Awesomium-vs-OpenWeb)

Good luck.


* - Zilog80 - Dec 22, 2015

(Dec 22, 2015 02:35 PM)nathan72389 Wrote:  holy shit, stop with your bull shit
learn what in the fuck your talking about.

(Dec 22, 2015 03:21 PM)The-One Wrote:  I can explain it to you: your image got removed!

See my last edit bro

Test #2:
postimg.org/image/ufoofqahf/full

With user-agent trick:
postimg.org/image/xcd4jynt9/full

But in real world, As I said, user-agent trick may not work. Evidence:
postimg.org/image/ozofm6do3/full

And doesnt work because web control wrapper sux, even you have IE11, 12 or 42 installed on your machine.

Recomendation for @op: use Xulrunner and Gecko (Google it)


* - idb. - Dec 22, 2015

Code
Protected Overrides Sub OnNavigating(ByVal e As WebBrowserNavigatingEventArgs)
     UrlMkSetSessionOption(&H10000001, "DeezNuts", 8, 0)
     MyBase.OnNavigating(e)
End Sub