Results 1 to 10 of 10

Thread: [vb.net] POST/GET Data help required + rep

  1. #1
    Water's Avatar
    Joined
    Nov 2012
    Posts
    792
    Userbars
    12
    Thanks
    474
    Thanked
    452/210
    DL/UL
    158/9
    Mentioned
    217 times
    Time Online
    54d 9h 37m
    Avg. Time Online
    18m

    [vb.net] POST/GET Data help required + rep

    So what I am basically trying to do is automate the post/get data types on neo. I've managed to finish the ck auth, neo login, and now up to automating requests.

    I'm using this as a template guide for POST/GET
    Code:
    Dim HTML As String = thewrapper.Request("POST", "http://www.neopets.com/login.phtml?destination=%2Findex.phtml&username=" & theusername & "&password=" & thepassword, "http://www.neopets.com/")
    So basically it is thewrapper.Request(Method, Url, Referer)

    As I moved on to automate a page on neo, i'm 100% sure this is the code that won't execute properly
    Code:
    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
            If CheckBox30.Checked = True Then
                Dim HTML As String = thewrapper.Request("POST", "http://www.neopets.com/faerieland/tdmbgpop.phtml?talkto=1", "http://www.neopets.com/faerieland/tdmbgpop.phtml")
                If HTML.Contains("The plushie remains ever silent,") = True Then
                    ListBox1.Items.Add("Completed")
                Else
                    ListBox1.Items.Add("Error")
                End If
            End If
        End Sub
    I've also tried re-writing the code.
    Code:
    Dim HTML As String = thewrapper.Request("POST", "http://www.neopets.com/faerieland/tdmbgpop.phtml?" & "talkto=1", "http://www.neopets.com/faerieland/tdmbgpop.phtml"
    It returns Error and doesn't complete the task :/
    The same applies for the GET Method

    Code:
    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
            If CheckBox30.Checked = True Then
                Dim HTML As String = thewrapper.Request("GET", "http://www.neopets.com/halloween/strtest/process_strtest.phtml?r=4080&lang=en&r=4964&scriptURL=http%3A%2F%2Fwww%2Eneopets%2Ecom%2Fhalloween%2Fstrtest%2Fprocess%5Fstrtest%2Ephtml&prizeScriptURL=http%3A%2F%2Fwww%2Eneopets%2Ecom%2Fhalloween%2Fstrtest%2Fstrtestprize%2Ephtml&FUIComponentClass=%5Btype+Function%5D&FScrollBarClass=%5Btype+Function%5D&total=613323&loaded=613323&percent=100%25&msg=&getScript=%5Btype+Function%5D&attachHammer=%5Btype+Function%5D&moved=0&ended=0&clicked=0&speed5%5Fset=0&speed4%5Fset=0&speed3%5Fset=0&speed2%5Fset=0&speed1%5Fset=0&sent=0&feedback=&hammer%5Ftype=hammer%5Fwood%5Fmc", "http://www.neopets.com/halloween/strtest/index.phtml")
                If HTML.Contains("View Process") = True Then
                    ListBox1.Items.Add("Completed")
                Else
                    ListBox1.Items.Add("Error")
                End If
            End If
        End Sub
    I'm pretty sure the issue is related to thewrapper.Request and what I am putting inside. :/
    Neither process the request, and i'm sitting here like
    Thanks for any help!

  2. #2
    Zachafer's Avatar
    Joined
    Dec 2011
    Posts
    1,235
    Userbars
    11
    Thanks
    769
    Thanked
    1,466/678
    DL/UL
    98/0
    Mentioned
    512 times
    Time Online
    24d 13h 9m
    Avg. Time Online
    8m
    Quote Originally Posted by Water View Post
    Neither process the request, and i'm sitting here like
    Is CheckBox30 Checked?

    If CheckBox30.Checked = True Then
    Does the ListBox1 show Completed or Error?

  3. #3
    Water's Avatar
    Joined
    Nov 2012
    Posts
    792
    Userbars
    12
    Thanks
    474
    Thanked
    452/210
    DL/UL
    158/9
    Mentioned
    217 times
    Time Online
    54d 9h 37m
    Avg. Time Online
    18m
    Quote Originally Posted by Zachafer View Post
    Is CheckBox30 Checked?

    Does the ListBox1 show Completed or Error?
    So when I run the window, I check the box 30, and in the listBox1 it shows Error.

  4. #4
    Saiyan Race
    j03's Avatar
    Joined
    Dec 2011
    Posts
    13,747
    Userbars
    176
    Thanks
    5,932
    Thanked
    33,163/6,620
    DL/UL
    23/36
    Mentioned
    3,871 times
    Time Online
    564d 5h 33m
    Avg. Time Online
    3h 13m
    For the dailies, like I explained via Private Message... check the post data, if you see values like r=1231209 for example, check both pages (before and after you do the daily) for these values in the page source. If you can CTRL + F it, then simply grab this value and send it with the post data request. If you don't see it, then it's just a random value. You obviously don't want to send the same random value each time (bot catching method) so send a randomized number, same amount of digits.
    (you need an account to see links)
    (you need an account to see links)(you need an account to see links)

    ------------------------
    [02/24/2013] Stealth CORE is made into the first standalone Neopets auto-player.
    ------------------------


  5. #5
    Water's Avatar
    Joined
    Nov 2012
    Posts
    792
    Userbars
    12
    Thanks
    474
    Thanked
    452/210
    DL/UL
    158/9
    Mentioned
    217 times
    Time Online
    54d 9h 37m
    Avg. Time Online
    18m
    Quote Originally Posted by Infamous Joe View Post
    For the dailies, like I explained via Private Message... check the post data, if you see values like r=1231209 for example, check both pages (before and after you do the daily) for these values in the page source. If you can CTRL + F it, then simply grab this value and send it with the post data request. If you don't see it, then it's just a random value. You obviously don't want to send the same random value each time (bot catching method) so send a randomized number, same amount of digits.
    So I'm looking for this(on page before submitting
    Code:
    <input type='hidden' name='talkto' value='1'>
    Sends this data
    talkto:1

    But cannot be found on the next page source, so it is irrelevant?

    So is this hash already used? I'm seeing it constantly when checking with other accounts.

  6. #6
    Saiyan Race
    j03's Avatar
    Joined
    Dec 2011
    Posts
    13,747
    Userbars
    176
    Thanks
    5,932
    Thanked
    33,163/6,620
    DL/UL
    23/36
    Mentioned
    3,871 times
    Time Online
    564d 5h 33m
    Avg. Time Online
    3h 13m
    @(you need an account to see links) I was talking about this:

    Code:
    If CheckBox1.Checked = True Then             Dim HTML As String = thewrapper.Request("POST", "http://www.neopets.com/desert/fruit/index.phtml?spin=1" & "ck=83asf32f37fd826831ff61a42f5", "http://www.neopets.com/desert/fruit/index.phtml"             If HTML.Contains("winning spin") = True Then                 ListBox1.Items.Add("Completed")             Else                 ListBox1.Items.Add("Error")             End If         End If
    When you PMed me. The blue grundo post data does not send any type of hashed string. (Also don't worry, I changed it up so can't be traced)

    Your Grundo daily code looks okay to me.

    Use Live HTTP Headers add-on for firefox to see the request to do the daily, simulate that in VB.NET. But you seem to already be doing that. Don't use the page HTML source for data collection unless you have to.
    Last edited by j03; 11-25-2014 at 08:18 AM.
    (you need an account to see links)
    (you need an account to see links)(you need an account to see links)

    ------------------------
    [02/24/2013] Stealth CORE is made into the first standalone Neopets auto-player.
    ------------------------


  7. #7
    Water's Avatar
    Joined
    Nov 2012
    Posts
    792
    Userbars
    12
    Thanks
    474
    Thanked
    452/210
    DL/UL
    158/9
    Mentioned
    217 times
    Time Online
    54d 9h 37m
    Avg. Time Online
    18m
    Quote Originally Posted by Infamous Joe View Post
    @(you need an account to see links) I was talking about this:

    Code:
    If CheckBox1.Checked = True Then             Dim HTML As String = thewrapper.Request("POST", "http://www.neopets.com/desert/fruit/index.phtml?spin=1" & "ck=83asf32f37fd826831ff61a42f5", "http://www.neopets.com/desert/fruit/index.phtml"             If HTML.Contains("winning spin") = True Then                 ListBox1.Items.Add("Completed")             Else                 ListBox1.Items.Add("Error")             End If         End If
    When you PMed me. The blue grundo post data does not send any type of hashed string. (Also don't worry, I changed it up so can't be traced)

    Your Grundo daily code looks okay to me.

    Use Live HTTP Headers add-on for firefox to see the request to do the daily, simulate that in VB.NET. But you seem to already be doing that. Don't use the page HTML source for data collection unless you have to.
    Theres my issue, the code is correct but it doesn't process, so when I go to check the daily it hasn't been completed. When I PM'ed you about the fruit machine, it was just an example. I'll have to re-build due to computer technicalities and re-write the code around it?

  8. #8
    Zachafer's Avatar
    Joined
    Dec 2011
    Posts
    1,235
    Userbars
    11
    Thanks
    769
    Thanked
    1,466/678
    DL/UL
    98/0
    Mentioned
    512 times
    Time Online
    24d 13h 9m
    Avg. Time Online
    8m
    How about you debug your code by saving the contents of HTML to a file where you can read the wrapper's response.

    Code:
    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
            If CheckBox30.Checked = True Then
                Dim HTML As String = thewrapper.Request("POST", "http://www.neopets.com/faerieland/tdmbgpop.phtml?talkto=1", "http://www.neopets.com/faerieland/tdmbgpop.phtml")
                System.IO.File.WriteAllText("grundo.html", HTML)
                If HTML.Contains("The plushie remains ever silent,") = True Then
                    ListBox1.Items.Add("Completed")
                Else
                    ListBox1.Items.Add("Error")
                End If
            End If
        End Sub

  9. The Following User Says Thank You to Zachafer For This Useful Post:

    Water (12-09-2014)

  10. #9
    Reemer's Avatar
    Joined
    Dec 2011
    Posts
    639
    Userbars
    8
    Thanks
    364
    Thanked
    446/256
    DL/UL
    39/0
    Mentioned
    203 times
    Time Online
    4d 13h 47m
    Avg. Time Online
    1m
    Debugging is much easier when you use the built in debugger. In Visual Studio you can even make changes to your code while debugging, it's a big time saver.

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

    Water (01-24-2015)

  12. #10

    Joined
    Apr 2014
    Posts
    363
    Thanks
    77
    Thanked
    346/143
    DL/UL
    51/7
    Mentioned
    105 times
    Time Online
    21d 20h 18m
    Avg. Time Online
    8m
    Quote Originally Posted by Reemer View Post
    Debugging is much easier when you use the built in debugger. In Visual Studio you can even make changes to your code while debugging, it's a big time saver.
    Agreed. @(you need an account to see links) A quick way to do it is by initiating a debug break after the line you're curious about. Do so just by clicking in the area to the left of the code, like so. Note you CAN'T do this on an empty line.
    When the code above it is executed, it will break to this.



    If you'd like to see the data of the HTML page you're connected to while running the debugger, hover over whatever string container you're using for the HTML of the page you're connected to, select HTML view and it will show you a visual representation of the result of your get/post request.

    Last edited by Carnage; 01-24-2015 at 06:15 PM.

  13. The Following 3 Users Say Thank You to Carnage For This Useful Post:

    j03 (01-24-2015),Reemer (01-24-2015),Water (01-24-2015)

Posting Permissions

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