Results 1 to 4 of 4
  1. #1
    amagos10's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    In cyprus, larnaca
    Posts
    9
    Reputation
    10
    Thanks
    1

    Question Need Help With A Program Using Search In A Site

    I want to make a program that i specify the ip and ports and when i search i get the results back, from this site: ipfingerprints.com/portscan.php


    I made the code for the button but i can't seem to make it work.
    Code:
    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        Try
            For Each elem1 As HtmlElement In WebBrowser2.document.GetElementsByTagName("Scan")
                WebBrowser2.document.GetElementById("remoteHost").SetAttribute("value", TextBox5.Text)
                WebBrowser2.document.GetElementById("start_port").SetAttribute("value", TextBox6.Text)
                WebBrowser2.document.GetElementById("end_port").SetAttribute("value", TextBox7.Text)
                If elem1.GetAttribute("className") = "input-button" Then
                    elem1.InvokeMember("click")
                End If
            Next
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub
    Any help would be appreciated!
    Attached Thumbnails Attached Thumbnails
    Screenshot_2.jpg  


  2. #2
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    Run a test for me..

    Code:
    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
    
    Dim itemCount as Integer = 0
        
        Try
            For Each elem1 As HtmlElement In WebBrowser2.document.GetElementsByTagName("Scan")
              itemCount +=1  
            Next
    
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    
        MessageBox.Show("Item Count: " & itemCount.ToString())
    End Sub
    How many items is it finding by the tag name "Scan"? If 0, then any code inside your FOREACH loop isn't getting run.

    ---------------------------------------------------------
    Code:
        For Each elem1 As HtmlElement In WebBrowser2.document.GetElementsByTagName("Scan")
                WebBrowser2.document.GetElementById("remoteHost").SetAttribute("value", TextBox5.Text)
                WebBrowser2.document.GetElementById("start_port").SetAttribute("value", TextBox6.Text)
                WebBrowser2.document.GetElementById("end_port").SetAttribute("value", TextBox7.Text)
    And surely you don't want that running inside a loop? No reason to set the attribute multiple times.
    GetElementById() is good, but doesn't need to be inside a loop.
    Last edited by abuckau907; 03-26-2014 at 02:57 PM.
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  3. #3
    amagos10's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    In cyprus, larnaca
    Posts
    9
    Reputation
    10
    Thanks
    1
    Sorry for the late reply, but my code was correct. I just had some values and class names wrong, thats all. My code, doesn't loop. It works fine.
    Thanks, again for the help anyway.
    Edit: The results come back in the browser and then i save the result class from the site in a txt file.
    Last edited by amagos10; 03-26-2014 at 03:18 PM.

  4. #4
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    Glad it's working.

    For Each IS a loop.
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

Similar Threads

  1. [Help Request] need help with injecting code/using it
    By 0xx-kyle-xx0 in forum Combat Arms Help
    Replies: 1
    Last Post: 06-17-2018, 12:02 PM
  2. Need help with a program - can pay
    By Matrixdudej in forum Visual Basic Programming
    Replies: 11
    Last Post: 11-25-2012, 12:16 PM
  3. [Solved] PLEAS HELP ME I NEED HELP WITH DL PROGRAMS
    By ahmedabdo743 in forum CrossFire Help
    Replies: 5
    Last Post: 04-10-2012, 03:38 PM
  4. [Help Request] i need help with the hack im using
    By kingster626 in forum Combat Arms Help
    Replies: 12
    Last Post: 06-18-2011, 10:15 PM
  5. We need help with our program! Can you do this? =]
    By Imthebosss in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 1
    Last Post: 11-07-2010, 02:51 AM

Tags for this Thread