Post Captain

Discussion of challenges you have already solved
Post Reply
User avatar
karma-fusebox
Posts: 23
Joined: Fri Mar 06, 2009 1:37 pm

Post Captain

Post by karma-fusebox »

just solved this one by simply using the infamous javascript/xsrf-thingy...
( http://www.hacker.org/forum/viewtopic.php?p=10478#10478 ) :roll:

i think there is hardly any more ugly approach.. so what is the real way to POST data to websites?
gfoot
Posts: 269
Joined: Wed Sep 05, 2007 11:34 pm
Location: Brighton, UK

Post by gfoot »

I don't remember this challenge, but probably just make a .html file containing a form with the right post variables? You can also use something like curl or wget from the command line, if you have access to them.
User avatar
karma-fusebox
Posts: 23
Joined: Fri Mar 06, 2009 1:37 pm

Post by karma-fusebox »

gfoot wrote:make a .html file containing a form with the right post variables?
thats what i did. but it seemed not very professional to me..

so i will have a look at wget/curl if i need this again.
PeterS
Posts: 24
Joined: Thu Mar 05, 2009 7:17 pm

Post by PeterS »

Doing it with curl probably would have been the easiest choice here, since it were only one line.
But I did it with a few lines of Python for my convenience:

Code: Select all

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import urllib

url = "http://www.hacker.org/challenge/chal.php"
data = {"answer": "marmelade", "id": "27", "go": "Submit", "name": "PeterS", "spw": "xxxxxxxxxxxxxxxxxxxxxxxxxxx"}

print urllib.urlopen(url, urllib.urlencode(data)).read()
Of course you would have to replace the x's with your submit pw, if you wanted to use it.
Pappe
Posts: 1
Joined: Fri Mar 06, 2009 12:16 pm

Post by Pappe »

I solved this by using firebug, simply edit get to post and execute the modified page
PeterS
Posts: 24
Joined: Thu Mar 05, 2009 7:17 pm

Post by PeterS »

Wow, that's so much easier, but I didn't think of this method when doing the challenge :shock:
Admiral Beotch
Posts: 4
Joined: Mon Oct 26, 2009 6:06 am
Location: Las Vegas, NV

Post by Admiral Beotch »

web developer plugin to change form from get to post, then tamper data plugin to modify the answer field.
Force4
Posts: 29
Joined: Wed Dec 16, 2009 8:33 pm

Post by Force4 »

You can also just type some javascript in the address bar of your browser:

javascript:function z(){document.frm.method='POST';};z();
Press enter, and use the form normally.
chephy
Posts: 17
Joined: Sat Oct 16, 2010 4:39 pm

Post by chephy »

Ah, this challenge is so much easier using today's browsers, e.g. using Chrome's built-in developer tools: right-click the submit button, choose »Inspect Element«, double-click on the »GET« in the HTML code, write »POST«, press the submit button as usual.

The same probably applies for Firefox in combination with some web developer extensions.
Guderian
Posts: 18
Joined: Tue Jan 25, 2011 4:31 pm
Location: Greece

Post by Guderian »

i used "Live HHTP Headers" addon for Firefox. Took me only a couple of seconds :D
Millennium
Posts: 17
Joined: Thu Apr 21, 2011 3:08 am

Post by Millennium »

I used Chrome's Inspect element and replaced "GET" with "POST" and pressed it.
snoopy1alpha
Posts: 4
Joined: Wed Jun 04, 2014 6:27 pm

Post by snoopy1alpha »

Firebug FTW
Post Reply