Welcome to HBH V2 ! 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.

Timed Challanges Maintaining sessions. - Python Code Bank

Timed Challanges Maintaining sessions.
There have plenty of discussions on time challenges regarding maintaining cookies on POST data, how ever there has been plenty post with uses "urllib", or "urllib2" library for the purpose, However, we can avoid whole mombo jambo of cookiejar with "requests" library. Example Code:
                import requests
url = 'https://www.hellboundhackers.org/challenges/timed/timed3/index.php'
login_url = 'https://www.hellboundhackers.org/'
with requests.Session() as s:
    USERNAME = 'your_username'
    PASSWORD = 'your_password'

    login_data = dict(user_name=USERNAME, user_pass=PASSWORD, login='Login')
    s.post(login_url, data=login_data, headers={'Referer': 'https://www.hellboundhackers.org/index.php'})
    page = s.get(url).text
# Logics of challange goes here .....
# once you find the answer, just post back the data.. with correct dict[url2 with proper action values] for example, for timed2/3 you could use.
    check_data = dict(ans=ans, submit='Check')
    s.post(url + '?check', check_data)
            
Comments
Sorry but there are no comments to display