Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

help with 2


ghost's Avatar
0 0

I have just started learning python and I need some help. I have the answer but I do not know how to submit it.

Is this the right path to go: req = urllib2.Request(url,Answer,dicHeaders)


ghost's Avatar
0 0

markupreq = urllib2.Request('url',values)


spyware's Avatar
Banned
0 0

markupreq = urllib2.Request('url', values)

@Mitz You forgot a space.

And yes; it's important.


ghost's Avatar
0 0

I might as well bump this as I'm in the exact same place now.

This is my current failure

values = urllib.urlencode ({'ans' : total,
                            'submit' : 'Check',
                            })


req = urllib2.Request(url, values)
response = urllib2.urlopen(req) 

And with that Im getting a malformed request asking me to make sure no referer spoofing applications are active


ghost's Avatar
0 0

stdio wrote: And with that Im getting a malformed request asking me to make sure no referer spoofing applications are active

That is because you are not including a referer in your header of your request.

Other than that, why don't you use the opener that I showed you how to build?

Build it then:

markupresp = opener.open("http://www.hellboundhackers.org/challenges/timed/timed2/index.php?check", data)

Where data is your urlencoded data (ans, submit).


ghost's Avatar
0 0

Thanks I actually was trying that first, but for some reason couldnt get it to work, so turned here and was using the older way.

Hopefully with a few modifications then I can get it working.

Edit: yeah I looked at my original attempt and was missing 2 things, both trivial and stupid. Thanks again for the help.