Results 1 to 3 of 3

Thread: Html Parsing Problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2014
    Posts
    3

    Html Parsing Problem

    Hello,

    Im making little virus scanner software, how can i get the scan results to richtextbox.

    http://www.garyshood.com/virus/resul...31ca06dc0a5efe

    heres my code, it can scan the file but my problem is getting the results to richtextbox.

    Code:
       Private Sub LogInButton2_Click(sender As Object, e As EventArgs) Handles LogInButton2.Click
    
            WebBrowser1.ScriptErrorsSuppressed = True
    
    
    
            WebBrowser1.Navigate("http://www.garyshood.com/virus/")
            WaitForPageLoad()
    
            WebBrowser1.Document.GetElementById("fileurl").SetAttribute("value", "http://www.heartpoint.com/images/congenital/vsd.gif")
    
            Dim inputElements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("input")
            For Each curElement As HtmlElement In inputElements
                If curElement.GetAttribute("type") = "radio" AndAlso curElement.GetAttribute("value") = "url" Then
                    curElement.InvokeMember("click")
                End If
            Next
    
    
            Dim inputElements2 As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("input")
            For Each curElement As HtmlElement In inputElements2
                If curElement.GetAttribute("type") = "submit" AndAlso curElement.GetAttribute("value") = "Scan" Then
                    curElement.InvokeMember("click")
                End If
            Next
    End Sub

  2. #2
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,398

    Re: Html Parsing Problem

    How on earth can you make white hat software..... You not even asked a question. Do you think Malware companys use kiddie browsers in the combat with malware/?

  3. #3
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,900

    Re: Html Parsing Problem

    I'm afraid your question isn't really making sense. That code snippet is scanning a web page and clicking any radio buttons or submit buttons. It doesn't produce any results so what were you intending to write to the RTB?

    Also, that code is web scraping which is something we strongly discourage round here because it can be used to access sites in ways that violate their TOCs. Do you have a good reason for doing this.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width