1 Replies - 210 Views - Last Post: 02 March 2013 - 09:34 AM Rate Topic: -----

#1 intermi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 02-March 13

Question, how to deal with "creation_time" & "form_tok

Posted 02 March 2013 - 08:23 AM

I'm trying to build an app in VS2010 with VB.NET, I need to do several posts with the same information on different forums, something like a bot but I need to do this manually and doing it all by myself it takes alot of time so I decided to try this.

I'm using Live HTTP Headers, I post something manually (create new topic), then I look into it and I copy the string of the POST method... Then I copy this string to my code and it works fine, I can login and post...

But after a certain time I can't do it anymore, I think it's because the string must change, specially in the parameters "lastclick", "creation_time" and "form_token"... This is an example of the string I'm talking about:

subject=" & TextBoxSubject.Text & "&addbbcode20=100&message=" & TextBoxMessage.Text & "&lastclick=1361985462&post=Submit&attach_sig=on&creation_time=1361985462&form_token=229b24d265f1058324716672f0f9f7c126b2b58e&poll_title=&poll_option_text=&poll_max_options=1&poll_length=0



As you can see, those 3 parameters have those long numbers, which lastclick is the same than creation_time...

I'd like to know how I can get those numbers and generate them programatically so I can post today, and again in one week from now for example and so on.

Here is another part of my code, if you think there's an easier way or something let me know so I can try to avoid this situation:

Dim postpost As String = "" 'here goes the same string as above
    Dim encoding As New UTF8Encoding
    Dim byteData As Byte() = encoding.GetBytes(postpost)

    Dim request As HttpWebRequest = DirectCast(WebRequest.Create(here I put the link of the "new topic" button), HttpWebRequest)
    request.Method = "POST"
    request.ContentType = "application/x-www-form-urlencoded"
    request.Referer = ''here the link where I came from
    request.UserAgent = "Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0"
    request.CookieContainer = logincookie 'this cookie has been saved at the beginning after the successfull login''
    request.ContentLength = byteData.Length

    Dim postreqstream As Stream = request.GetRequestStream()
    postreqstream.Write(byteData, 0, byteData.Length)
    postreqstream.Close()

    Dim response As HttpWebResponse = DirectCast(request.GetResponse(), HttpWebResponse)
    Dim reader As New StreamReader(response.GetResponseStream)
    Dim thepost As String = reader.ReadToEnd
    RichTextBox1.Text = thepost


Thanks alot! Sorry for my english!

Is This A Good Question/Topic? 0
  • +

Replies To: Question, how to deal with "creation_time" & "form_tok

#2 GunnerInc  Icon User is offline

  • "Hurry up and wait"
  • member icon




Reputation: 858
  • View blog
  • Posts: 2,284
  • Joined: 28-March 11

Re: Question, how to deal with "creation_time" & "form_tok

Posted 02 March 2013 - 09:34 AM

Quote

I need to do several posts with the same information on different forums, something like a bot but I need to do this manually and doing it all by myself it takes alot of time so I decided to try this.


This is called spamming and is a bot, we do not help with these types of topics. Please do not open another thread on this topic.

Thanks...

*** Closed ***
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1