Skip to content
talklittle edited this page Sep 13, 2010 · 1 revision

147    def make_cookie(self, timestr = None, admin = False):
148        if not self.loaded:
149            self.load()
150        timestr = timestr or time.strftime(‘%Y-%m-%dT%H:%M:%S’)
151        id_time = str(self.id) + ‘,’ + timestr
152        to_hash = ‘,’.join((id_time, self.password, g.SECRET))
153        if admin:
154            to
hash += ‘admin’
155        return id
time + ‘,’ + sha.new(to
hash).hexdigest()

Pasted from <http://code.reddit.com/browser/r2/r2/models/account.py#L301>

After logging in via POST to www.reddit.com/api/login/, the GET to / (or any regular HTML page) produces a huge uncompressed HTML file (160 kb). Split into 16 kb chunks, divided by unique separators (strings of digits). Contains this piece on the 2nd line (within first 1050 chars of file) :

Clone this wiki locally