1

The log-in part of my python script is below.

import urllib2
import urllib
import re
import cookielib

cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))

opener.addheaders = [('User-agent', 'Mozilla/5.0')]

urllib2.install_opener(opener)

authentication_url = 'https://www.roblox.com/newlogin'

payload = {
    'username' : 'myusername',
    'password' : 'mypassword',
    '' : 'Log In',
    }

data = urllib.urlencode(payload)

req = urllib2.Request(authentication_url, data)

resp = urllib2.urlopen(req)

tc = urllib2.urlopen("http://www.roblox.com/My/Money.aspx").read()

This script works, but Roblox (The website I am logging into) has a captcha when I send too many log-in requests. I have a cron job on my Raspberry Pi that is running the script every 10 minutes. I had the idea to use the log-in credentials to log in and then use the .ROBLOSECURITY cookie to log in as many times necessary after that until that cookie expires. After the .ROBLOSECURITY cookie expires, the program could log in once more and use the new .ROBLOSECURITY cookie that was generated.

So my question is, how can I access the .ROBLOSECURITY cookie's contents after I logged in using the regular log-in credentials? Also, I already have a script that logs into the website using this cookie; I used that temporarily until I could find out how to log in with credentials. When I was using that temporary log in system, I used EditThisCookie, a Google Chrome extension that allows you to edit your cookies, to find the .ROBLOSECURITY cookie.

Rontron
  • 3,963
  • 7
  • 26
  • 44

0 Answers0