Author Topic: Post to blockland forums with HTTP Objects?  (Read 3132 times)

Start with this, in the filter bar:

http.host == forum.blockland.us

First of all, you'll need to grab a login cookie.
Here's something I wrote in Python:

Code: [Select]
def get_login_cookie(username, password):
    body = urllib.urlencode('user=%s&passwrd=%s&cookieneverexp=1' % (username, password))
    headers = {
        'Host': 'forum.blockland.us',
        'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0',
        'Connection': 'close',
        'Referer': 'http://forum.blockland.us/index.php?action=login;wap2',
        'Content-Type': 'application/x-www-form-urlencoded'
    }
   
    urllib2.urlopen(urllib2.Request('http://forum.blockland.us/index.php?action=login2;wap2', body, headers))

So basically, you'll need to send a POST request with some specific headers to http://forum.blockland.us/index.php?action=login2;wap2 with the following data:
user=username&passwrd=password&cookieneverexp=1

Once you get some data, look through the headers for a Set-Cookie header and do stuff with that. You pretty much only need to do this once because of cookieneverexp, but you can do it again if the session somehow becomes invalid.

When you need to post something, such as a reply to a topic, first do a GET for http://forum.blockland.us/index.php?action=post;topic=195212.0;num_replies=8;wap2 (that's for this topic) with your cookie passed as a Cookie header and look through all the input elements. They have some information (name, value) that you'll need to save, such as sc and seqnum.

Then, change some of the values you got, such as message and send a POST request to http://forum.blockland.us/index.php?action=post2;start=0;board=25 (still taking this topic as example destination) with your cookie passed as a Cookie header. For the data, you need to use the information you saved previously. Build it as follows: var_name=var_value&something_else=dunno&foo=bar

It's important that you pass all the information you got in the GET request previously or you might session errors or start a new topic instead of simply making a reply.

All the links I stated except for login depend on where you want to post. You can get the URL for the initial GET request from the REPLY button, and the URL for the POST request from the action attribute of the form element on the page you got from the initial GET request.

Start with this, in the filter bar:

http.host == forum.blockland.us
oh, thanks. that'll be useful.

saw this, meant to post, didn't :c

Thanks for this, it looks like I have some reading to do on syntax.

Bad idea, Badspot will shove his snake so far up your ass your bowl movements will commit Self Delete probably ban you.

The amount of people in this thread that think this is some atrocious deed makes me laugh.

My sides are exploding
That's Ephialtes damnit!

Automated posting of any kind

Automated posting of any kind
browser automatically arranges my words into a TCP packet following the HTTP protocol specifically with data loaded from the disk, and that loading is handled by the OS.

browser automatically arranges my words into a TCP packet following the HTTP protocol specifically with data loaded from the disk, and that loading is handled by the OS.
Automated = not done by human using the forum interface.

Ephialtes is an exception.

Automated = not done by human using the forum interface.

Ephialtes is an exception.
eliptits is a robot

eliptits
I bet that was on purpose

epipalts is not a robot.

I bet that was on purpose

epipalts is not a robot.
It was completely on accident.

your spelling elipitats name wrong


He is having people post to the forums manually, just using an in-game interface.

still really not clear what the big loving deal is over manually posting

it's like using a web browser
but instead, it's over torquescript

i mean
exact same thing

ya'll are telling me i am not allowed to post because i don't use my bare hands to craft tcp packets