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

I set up a little wireshark in an attempt to try to read through, but I don't know what the forget I'm doing. Can someone give me some pointers for posting on these forums via script?

I can guarantee you'll be banned if you do that.

EDIT: Its not even possible to do it with HTTPobjects. You'd need to use TCPobjects.
« Last Edit: May 28, 2012, 12:01:52 AM by Ipquarx »

HTTPobjects are ridiculously broken, you'll have to use raw TCP implementing HTTP/1.1

Google the specs and/or look at RTB

Also have fun getting in stuff for it yeah

Why would someone get into deep stuff for using the forums as normal, albeit not using a web browser?

I wouldn't use it to spam the forums or some stuff.


did i say automated
no i did not
i said i wanted to post from a script
does this mean automated
it might imply that, but that is not what i meant

did i say automated
no i did not
i said i wanted to post from a script
does this mean automated
it might imply that, but that is not what i meant

it's still not done by a person through a browser

how is this that any loving different than posting through a browser


that's like saying you're giving priority to firefox over chrome

it sends the same info
controlled the same way

is there more stress on the server or something?

Why don't you ask Badspot?
« Last Edit: May 28, 2012, 07:08:47 AM by Port »

He's been active in the past 15 minutes, you might as well try

Meh.

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.
« Last Edit: May 28, 2012, 07:12:54 AM by Port »


RTB
My sides are exploding
That's Ephialtes damnit!

It's considered automated if you're doing it through script.
Trust me, it's not a good idea. You'll be banned If you use it I can guarentee.

I'm pretty sure that what he's trying to do is make an in-game forum browser, so it might be allowed.

I'm pretty sure that what he's trying to do is make an in-game forum browser, so it might be allowed.
maybe tied to only one forum topic, but.. yeah, that's what i'm trying to do