Results 1 to 12 of 12
  1. #1
    Sydney's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Germany...
    Posts
    1,356
    Reputation
    37
    Thanks
    1,144
    My Mood
    Amused

    HTML Information Loading Issue

    Hi i want to create a App that finds some Informations from a HTML code as Label.


    Example:

    LoadEvent:

    Webbrowser1.Navigate("www.website.com/User=" & Textbox1.Text)

    This will Load the UserInformation Place where Posts etc is written.

    Now i want that it Laods some Informations Like:

    Button1:

    Label1.Text = Webbrowser1.Document.GetElementById.("HTML-Code-Name").Inner Text

    That should draw the informatio from a html id of the user as label1.

    But it is not working. Anyone knows how to do that cuz i am not very good in HTML.

    Thanks

    Thanks Cosmos


  2. #2
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    I don't understand...

    Do you wanna display the HTML code of a page?

  3. The Following User Says Thank You to Lolland For This Useful Post:

    Sydney (01-02-2011)

  4. #3
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Either use RegEx or a StringBetween function.

    Save the sourcecode of the page in a variable and extract the data you want to extract.



  5. #4
    Sydney's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Germany...
    Posts
    1,356
    Reputation
    37
    Thanks
    1,144
    My Mood
    Amused
    So i want my application to fish the as example Posts of the User Informations Bar.

    Like:

    Load:
    webbrowser1.navigate("www.website.com/user=kongamonga")

    button1
    Label1.Text = Post of the user from the html code of the site.

    That what i want, that it gets the as example posts or like activity.

    Thanks Cosmos


  6. #5
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Quote Originally Posted by kongamonga View Post
    So i want my application to fish the as example Posts of the User Informations Bar.

    Like:

    Load:
    webbrowser1.navigate("www.website.com/user=kongamonga")

    button1
    Label1.Text = Post of the user from the html code of the site.

    That what i want, that it gets the as example posts or like activity.
    Quote Originally Posted by Blubb1337 View Post
    Either use RegEx or a StringBetween function.

    Save the sourcecode of the page in a variable and extract the data you want to extract.
    ..........................



  7. #6
    Sydney's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Germany...
    Posts
    1,356
    Reputation
    37
    Thanks
    1,144
    My Mood
    Amused
    Quote Originally Posted by Blubb1337 View Post
    ..........................
    more informations plz

    Thanks Cosmos


  8. #7
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,669
    My Mood
    Breezy
    User regex to grab that information from the page's source like Blubb said!
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  9. #8
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    [php]Public Function Sb(ByVal text As String, ByVal startstring As String, ByVal endstring As String) 'string between
    Dim part1() As String = Split(text, startstring)

    If UBound(part1) > 0 Then
    Dim part2() As String = Split(part1(1), endstring)

    If UBound(part2) > 0 Then
    Return part2(0)
    Else
    Return -2
    End If
    Else
    Return -1
    End If
    End Function
    [/php]



  10. #9
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Use a HttpWebRequest or a WebClient to download the HTML source into a string variable.

    [php]
    Private Function GetSauce(ByVal URL As String) As String
    Dim pageSauce as string = String.Empty
    Using wClient As New Net.WebClient With {.Encoding = System.Text.Encoding.UTF8}
    pageSauce = wClient.DownloadString(URL)
    End Using
    Return pageSauce
    End Function
    [/php]

    Or

    [php]
    Private Function GetSauce(ByVal URL As String) As String
    Using sRead As New IO.StreamReader(CType(Net.WebRequest.Create(URL), Net.HttpWebRequest).GetResponse.GetResponseStream)
    Return sRead.ReadToEnd
    End Using
    End Function
    [/php]

    The above is actually ugly as fuck so here's a neater one:
    [php]
    Private Function GetSauce(ByVal URL As String) As String
    Dim WebReq As Net.HttpWebRequest = Ctype(Net.WebRequest.Create(URL), Net.HttpWebRequest)
    Dim WebResp As Net.HttpWebResponse = Ctype(webReq.GetResponse, Net.HttpWebResponse)
    Using sRead As New IO.StreamReader(WebResp.GetResponseStream)
    Return sRead.ReadToEnd
    End Using
    End Function
    [/php]

    Now you just assign the value that is returned by "GetSauce("https://www,website.com/User=" & TextBox1.Text)" To a variable, then use string manipulation to get the values you need.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  11. The Following User Says Thank You to Jason For This Useful Post:

    Sydney (01-03-2011)

  12. #10
    Sydney's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Germany...
    Posts
    1,356
    Reputation
    37
    Thanks
    1,144
    My Mood
    Amused
    Quote Originally Posted by Jason View Post
    Use a HttpWebRequest or a WebClient to download the HTML source into a string variable.

    [php]
    Private Function GetSauce(ByVal URL As String) As String
    Dim pageSauce as string = String.Empty
    Using wClient As New Net.WebClient With {.Encoding = System.Text.Encoding.UTF8}
    pageSauce = wClient.DownloadString(URL)
    End Using
    Return pageSauce
    End Function
    [/php]

    Or

    [php]
    Private Function GetSauce(ByVal URL As String) As String
    Using sRead As New IO.StreamReader(CType(Net.WebRequest.Create(URL), Net.HttpWebRequest).GetResponse.GetResponseStream)
    Return sRead.ReadToEnd
    End Using
    End Function
    [/php]

    The above is actually ugly as fuck so here's a neater one:
    [php]
    Private Function GetSauce(ByVal URL As String) As String
    Dim WebReq As Net.HttpWebRequest = Ctype(Net.WebRequest.Create(URL), Net.HttpWebRequest)
    Dim WebResp As Net.HttpWebResponse = Ctype(webReq.GetResponse, Net.HttpWebResponse)
    Using sRead As New IO.StreamReader(WebResp.GetResponseStream)
    Return sRead.ReadToEnd
    End Using
    End Function
    [/php]

    Now you just assign the value that is returned by "GetSauce("https://www,website.com/User=" & TextBox1.Text)" To a variable, then use string manipulation to get the values you need.
    Thanks for your work, but what if my element (name) has no value ?
    Theres just the element ID and no name tag.

    Thanks Cosmos


  13. #11
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Quote Originally Posted by Blubb1337 View Post
    [php]Public Function Sb(ByVal text As String, ByVal startstring As String, ByVal endstring As String) 'string between
    Dim part1() As String = Split(text, startstring)

    If UBound(part1) > 0 Then
    Dim part2() As String = Split(part1(1), endstring)

    If UBound(part2) > 0 Then
    Return part2(0)
    Else
    Return -2
    End If
    Else
    Return -1
    End If
    End Function
    [/php]
    Are you completely ignoring me?

    msgbox(SB(pagesource, "<bla>","</bla>"))



  14. The Following User Says Thank You to Blubb1337 For This Useful Post:

    Sydney (01-03-2011)

  15. #12
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Well, you can PM me with the webpage in question and I'll try see whether the problem is that you don't have the correct ID's at the moment, if that's the problem none of our solutions will help you much as they'll likely rely on you putting in the elements ID at some point.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)